From 06ccf1ca794e1c9f22a28a07be561bf45cee9343 Mon Sep 17 00:00:00 2001 From: scttgs0 Date: Sun, 7 May 2023 15:25:56 -0500 Subject: [PATCH] add lib/ and lib64/ to search path --- CMakeModules/FindSimGear.cmake | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/CMakeModules/FindSimGear.cmake b/CMakeModules/FindSimGear.cmake index 2720c20b..f710c0db 100644 --- a/CMakeModules/FindSimGear.cmake +++ b/CMakeModules/FindSimGear.cmake @@ -30,13 +30,13 @@ include(SelectLibraryConfigurations) macro(find_sg_library libName varName libs) set(libVarName "${varName}_LIBRARY") # do not cache the library check - unset(${libVarName}_DEBUG CACHE) - unset(${libVarName}_RELEASE CACHE) + # unset(${libVarName}_DEBUG CACHE) + # unset(${libVarName}_RELEASE CACHE) FIND_LIBRARY(${libVarName}_DEBUG NAMES ${libName}${CMAKE_DEBUG_POSTFIX} 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 /usr/local /usr @@ -45,29 +45,29 @@ macro(find_sg_library libName varName libs) FIND_LIBRARY(${libVarName}_RELEASE NAMES ${libName}${CMAKE_RELEASE_POSTFIX} 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 /usr/local /usr /opt ) - # message(STATUS "before: Simgear ${${libVarName}_RELEASE} ") - # message(STATUS "before: Simgear ${${libVarName}_DEBUG} ") + # message(STATUS "before: Simgear ${${libVarName}_RELEASE} ") + # message(STATUS "before: Simgear ${${libVarName}_DEBUG} ") select_library_configurations( ${varName} ) - # message(STATUS "after:Simgear ${${libVarName}_RELEASE} ") - # message(STATUS "after:Simgear ${${libVarName}_DEBUG} ") + # message(STATUS "after:Simgear ${${libVarName}_RELEASE} ") + # message(STATUS "after:Simgear ${${libVarName}_DEBUG} ") set(componentLibRelease ${${libVarName}_RELEASE}) - # message(STATUS "Simgear ${libVarName}_RELEASE ${componentLibRelease}") + # message(STATUS "Simgear ${libVarName}_RELEASE ${componentLibRelease}") set(componentLibDebug ${${libVarName}_DEBUG}) - # message(STATUS "Simgear ${libVarName}_DEBUG ${componentLibDebug}") + # message(STATUS "Simgear ${libVarName}_DEBUG ${componentLibDebug}") if (NOT ${libVarName}_DEBUG) if (NOT ${libVarName}_RELEASE) - #message(STATUS "found ${componentLib}") + # message(STATUS "found ${componentLib}") list(APPEND ${libs} ${componentLibRelease}) endif() else() @@ -138,8 +138,8 @@ if(SIMGEAR_SHARED) set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES "") set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES "") - # message(STATUS "core lib ${SIMGEAR_CORE_LIBRARIES}") - # message(STATUS "all libs ${SIMGEAR_LIBRARIES}") + # message(STATUS "core lib ${SIMGEAR_CORE_LIBRARIES}") + # message(STATUS "all libs ${SIMGEAR_LIBRARIES}") else(SIMGEAR_SHARED) set(SIMGEAR_LIBRARIES "") # clear value @@ -239,4 +239,3 @@ unset(CMAKE_REQUIRED_DEFINITIONS) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG SIMGEAR_LIBRARIES SIMGEAR_CORE_LIBRARIES SIMGEAR_INCLUDE_DIR SIMGEAR_COMPILE_TEST) -