1
0
Fork 0

add lib/ and lib64/ to search path

This commit is contained in:
scttgs0 2023-05-07 15:25:56 -05:00
parent d8ade7ba31
commit 06ccf1ca79

View file

@ -30,13 +30,13 @@ include(SelectLibraryConfigurations)
macro(find_sg_library libName varName libs) macro(find_sg_library libName varName libs)
set(libVarName "${varName}_LIBRARY") set(libVarName "${varName}_LIBRARY")
# do not cache the library check # do not cache the library check
unset(${libVarName}_DEBUG CACHE) # unset(${libVarName}_DEBUG CACHE)
unset(${libVarName}_RELEASE CACHE) # unset(${libVarName}_RELEASE CACHE)
FIND_LIBRARY(${libVarName}_DEBUG FIND_LIBRARY(${libVarName}_DEBUG
NAMES ${libName}${CMAKE_DEBUG_POSTFIX} NAMES ${libName}${CMAKE_DEBUG_POSTFIX}
HINTS $ENV{SIMGEAR_DIR} HINTS $ENV{SIMGEAR_DIR}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} libs64 libs libs/Win32 libs/Win64 PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib libs64 libs libs/Win32 libs/Win64
PATHS PATHS
/usr/local /usr/local
/usr /usr
@ -45,29 +45,29 @@ macro(find_sg_library libName varName libs)
FIND_LIBRARY(${libVarName}_RELEASE FIND_LIBRARY(${libVarName}_RELEASE
NAMES ${libName}${CMAKE_RELEASE_POSTFIX} NAMES ${libName}${CMAKE_RELEASE_POSTFIX}
HINTS $ENV{SIMGEAR_DIR} HINTS $ENV{SIMGEAR_DIR}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} libs64 libs libs/Win32 libs/Win64 PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib libs64 libs libs/Win32 libs/Win64
PATHS PATHS
/usr/local /usr/local
/usr /usr
/opt /opt
) )
# message(STATUS "before: Simgear ${${libVarName}_RELEASE} ") # message(STATUS "before: Simgear ${${libVarName}_RELEASE} ")
# message(STATUS "before: Simgear ${${libVarName}_DEBUG} ") # message(STATUS "before: Simgear ${${libVarName}_DEBUG} ")
select_library_configurations( ${varName} ) select_library_configurations( ${varName} )
# message(STATUS "after:Simgear ${${libVarName}_RELEASE} ") # message(STATUS "after:Simgear ${${libVarName}_RELEASE} ")
# message(STATUS "after:Simgear ${${libVarName}_DEBUG} ") # message(STATUS "after:Simgear ${${libVarName}_DEBUG} ")
set(componentLibRelease ${${libVarName}_RELEASE}) set(componentLibRelease ${${libVarName}_RELEASE})
# message(STATUS "Simgear ${libVarName}_RELEASE ${componentLibRelease}") # message(STATUS "Simgear ${libVarName}_RELEASE ${componentLibRelease}")
set(componentLibDebug ${${libVarName}_DEBUG}) set(componentLibDebug ${${libVarName}_DEBUG})
# message(STATUS "Simgear ${libVarName}_DEBUG ${componentLibDebug}") # message(STATUS "Simgear ${libVarName}_DEBUG ${componentLibDebug}")
if (NOT ${libVarName}_DEBUG) if (NOT ${libVarName}_DEBUG)
if (NOT ${libVarName}_RELEASE) if (NOT ${libVarName}_RELEASE)
#message(STATUS "found ${componentLib}") # message(STATUS "found ${componentLib}")
list(APPEND ${libs} ${componentLibRelease}) list(APPEND ${libs} ${componentLibRelease})
endif() endif()
else() else()
@ -138,8 +138,8 @@ if(SIMGEAR_SHARED)
set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES "") set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES "")
set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES "") set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES "")
# message(STATUS "core lib ${SIMGEAR_CORE_LIBRARIES}") # message(STATUS "core lib ${SIMGEAR_CORE_LIBRARIES}")
# message(STATUS "all libs ${SIMGEAR_LIBRARIES}") # message(STATUS "all libs ${SIMGEAR_LIBRARIES}")
else(SIMGEAR_SHARED) else(SIMGEAR_SHARED)
set(SIMGEAR_LIBRARIES "") # clear value set(SIMGEAR_LIBRARIES "") # clear value
@ -239,4 +239,3 @@ unset(CMAKE_REQUIRED_DEFINITIONS)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG
SIMGEAR_LIBRARIES SIMGEAR_CORE_LIBRARIES SIMGEAR_INCLUDE_DIR SIMGEAR_COMPILE_TEST) SIMGEAR_LIBRARIES SIMGEAR_CORE_LIBRARIES SIMGEAR_INCLUDE_DIR SIMGEAR_COMPILE_TEST)