add lib/ and lib64/ to search path
This commit is contained in:
parent
d8ade7ba31
commit
06ccf1ca79
1 changed files with 13 additions and 14 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue