cmlib/CMLibGlobalVariables.cmake

15 lines
454 B
CMake

# CMLIB_PROJECT_NAME_CANONICAL
string(TOUPPER ${PROJECT_NAME} _project_name_uppercase)
string(REGEX REPLACE "[ -]" "_" _project_name_fixed ${_project_name_uppercase})
set(CMLIB_PROJECT_NAME_CANONICAL ${_project_name_fixed})
# CMLIB_MODULE_DIR
set(CMLIB_MODULE_DIR "")
foreach(_m ${CMAKE_MODULE_PATH})
if(EXISTS ${_m}/CMLibCommon.cmake)
get_filename_component(CMLIB_MODULE_DIR ${_m}/CMLibCommon.cmake DIRECTORY)
break()
endif()
endforeach()