diff --git a/cmake/cable/CableToolchains.cmake b/cmake/cable/CableToolchains.cmake index b881b35..d5af2cb 100644 --- a/cmake/cable/CableToolchains.cmake +++ b/cmake/cable/CableToolchains.cmake @@ -17,8 +17,15 @@ function(cable_configure_toolchain) set(TOOLCHAIN ${default_toolchain} CACHE STRING "CMake toolchain") - set(toolchain_file ${cable_toolchain_dir}/${TOOLCHAIN}.cmake) + set(toolchain_file toolchains/${TOOLCHAIN}.cmake) + foreach(path ${CMAKE_MODULE_PATH}) + if(EXISTS "${path}/${toolchain_file}") + set(toolchain_file "${path}/${toolchain_file}") + break() + endif() + endforeach() + cable_debug("Toolchain file: ${toolchain_file}") set(CMAKE_TOOLCHAIN_FILE ${toolchain_file} CACHE FILEPATH "CMake toolchain file") endif() endfunction() diff --git a/cmake/cable/bootstrap.cmake b/cmake/cable/bootstrap.cmake index 4255ae6..479c9fe 100644 --- a/cmake/cable/bootstrap.cmake +++ b/cmake/cable/bootstrap.cmake @@ -10,7 +10,7 @@ # # This is internal variable automaticaly updated with external tools. # Use CABLE_VERSION variable if you need this information. -set(version 0.2.2) +set(version 0.2.3) # For conveniance, add the project CMake module dir to module path. set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -18,7 +18,6 @@ if(EXISTS ${module_dir}) list(APPEND CMAKE_MODULE_PATH ${module_dir}) endif() - if(CABLE_VERSION) # Some other instance of Cable was initialized in the top project. @@ -45,7 +44,7 @@ if(CABLE_VERSION) message( ${severity} - "[cable ] Parent Cable ${CABLE_VERSION} (${comment}) initialized in `${cable_top_project_name}` project" + "[cable ] Cable ${CABLE_VERSION} (${comment}) initialized in the `${cable_top_project_name}` parent project" ) cable_debug("Project CMake modules directory: ${module_dir}")