mirror of https://github.com/status-im/evmc.git
Cable 0.2.3: Allow loading toolchain files from outside of cable dir
This commit is contained in:
parent
81ac4b62ab
commit
8dc2793f5f
|
@ -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()
|
||||
|
|
|
@ -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}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue