Путь к каталогу со сторонними модулями
This commit is contained in:
parent
cee2aea787
commit
6d491b1728
@ -1,7 +1,7 @@
|
||||
option(USE_PVS_STUDIO "Use PVS-Studio for static analysis" OFF)
|
||||
|
||||
if(USE_PVS_STUDIO)
|
||||
include(3rdparty/PVS-Studio)
|
||||
include(PVS-Studio)
|
||||
find_program(PVS_STUDIO_ANALYZER_EXE NAMES pvs-studio-analyzer)
|
||||
if(PVS_STUDIO_ANALYZER_EXE AND NOT TARGET pvs-global-checker)
|
||||
pvs_studio_add_target(TARGET pvs-global-checker
|
||||
|
@ -4,7 +4,6 @@ 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)
|
||||
@ -12,3 +11,12 @@ foreach(_m ${CMAKE_MODULE_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(CMLIB_MODULE_DIR)
|
||||
if(NOT DEFINED CMLIB_3RDPARTY_DIR)
|
||||
set(CMLIB_3RDPARTY_DIR "${CMLIB_MODULE_DIR}/3rdparty")
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMLIB_3RDPARTY_DIR})
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "CMLib directory not found.")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user