mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Configuration - Single config lib direct linking #289
Enhance PROCESS_CSF_LIBRARIES function to track last detected library for improved directory handling
This commit is contained in:
parent
398c507264
commit
81a807b6cf
@ -768,6 +768,7 @@ function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
|
|||||||
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
|
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
|
||||||
set (DEBUG_DIR "")
|
set (DEBUG_DIR "")
|
||||||
set (RELEASE_DIR "")
|
set (RELEASE_DIR "")
|
||||||
|
set (LAST_DETECTED_LIBRARY "")
|
||||||
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
|
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
|
||||||
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
|
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
|
||||||
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
|
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
|
||||||
@ -782,6 +783,7 @@ function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
|
|||||||
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
||||||
NOT "x${IS_ENDING}" STREQUAL "x" OR
|
NOT "x${IS_ENDING}" STREQUAL "x" OR
|
||||||
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
|
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
|
||||||
|
set (LAST_DETECTED_LIBRARY "${CURRENT_CACHE_LIBRARY}")
|
||||||
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
|
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
|
||||||
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
|
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
|
||||||
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
|
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
|
||||||
@ -789,6 +791,7 @@ function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
|
|||||||
set (LIBRARY_FROM_CACHE 1)
|
set (LIBRARY_FROM_CACHE 1)
|
||||||
elseif ("3rdparty_${CSF_LIBRARY}_library_debug" STREQUAL "${CACHE_VARIABLE}" OR
|
elseif ("3rdparty_${CSF_LIBRARY}_library_debug" STREQUAL "${CACHE_VARIABLE}" OR
|
||||||
"3rdparty_${CSF_LIBRARY}_debug_library" STREQUAL "${CACHE_VARIABLE}")
|
"3rdparty_${CSF_LIBRARY}_debug_library" STREQUAL "${CACHE_VARIABLE}")
|
||||||
|
set (LAST_DETECTED_LIBRARY "${CURRENT_CACHE_LIBRARY}")
|
||||||
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
|
get_filename_component(LIBRARY_NAME "${CURRENT_CACHE_LIBRARY}" NAME)
|
||||||
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
|
list (APPEND FOUND_LIBS "${LIBRARY_NAME}")
|
||||||
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
|
get_filename_component(LIBRARY_DIR "${CURRENT_CACHE_LIBRARY}" DIRECTORY)
|
||||||
@ -807,6 +810,8 @@ function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
|
|||||||
if (DEBUG_DIR AND RELEASE_DIR)
|
if (DEBUG_DIR AND RELEASE_DIR)
|
||||||
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
|
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
|
||||||
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
|
list (APPEND FOUND_RELEASE_DIRS "${RELEASE_DIR}")
|
||||||
|
elseif (EXISTS "${LAST_DETECTED_LIBRARY}")
|
||||||
|
list (APPEND FOUND_DEBUG_DIRS "${LAST_DETECTED_LIBRARY}")
|
||||||
elseif (DEBUG_DIR)
|
elseif (DEBUG_DIR)
|
||||||
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
|
list (APPEND FOUND_DEBUG_DIRS "${DEBUG_DIR}")
|
||||||
list (APPEND FOUND_RELEASE_DIRS "${DEBUG_DIR}")
|
list (APPEND FOUND_RELEASE_DIRS "${DEBUG_DIR}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user