Update FindSimGear for simplified lib names.
This commit is contained in:
parent
f675d51c29
commit
29e8307e3f
1 changed files with 2 additions and 48 deletions
|
@ -75,13 +75,6 @@ macro(find_sg_library libName varName libs)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(find_sg_component comp libs)
|
|
||||||
set(compLib "sg${comp}")
|
|
||||||
string(TOUPPER "SIMGEAR_${comp}" libVar)
|
|
||||||
|
|
||||||
find_sg_library(${compLib} ${libVar} ${libs})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
FIND_PATH(SIMGEAR_INCLUDE_DIR simgear/math/SGMath.hxx
|
FIND_PATH(SIMGEAR_INCLUDE_DIR simgear/math/SGMath.hxx
|
||||||
HINTS $ENV{SIMGEAR_DIR}
|
HINTS $ENV{SIMGEAR_DIR}
|
||||||
PATH_SUFFIXES include
|
PATH_SUFFIXES include
|
||||||
|
@ -153,51 +146,12 @@ else(SIMGEAR_SHARED)
|
||||||
set(SIMGEAR_CORE_LIBRARIES "") # clear value
|
set(SIMGEAR_CORE_LIBRARIES "") # clear value
|
||||||
message(STATUS "looking for static SimGear libraries")
|
message(STATUS "looking for static SimGear libraries")
|
||||||
|
|
||||||
# note the order here affects the order Simgear libraries are
|
find_sg_library(SimGearCore SIMGEAR_CORE SIMGEAR_CORE_LIBRARIES)
|
||||||
# linked in, and hence ability to link when using a traditional
|
find_sg_library(SimgearScene SIMGEAR_SCENE SIMGEAR_LIBRARIES)
|
||||||
# linker such as GNU ld on Linux
|
|
||||||
set(comps
|
|
||||||
environment
|
|
||||||
nasal
|
|
||||||
tsync
|
|
||||||
bvh
|
|
||||||
bucket
|
|
||||||
io
|
|
||||||
serial
|
|
||||||
math
|
|
||||||
props
|
|
||||||
structure
|
|
||||||
timing
|
|
||||||
xml
|
|
||||||
misc
|
|
||||||
threads
|
|
||||||
debug
|
|
||||||
magvar
|
|
||||||
)
|
|
||||||
|
|
||||||
set(scene_comps
|
|
||||||
ephem
|
|
||||||
sky
|
|
||||||
material
|
|
||||||
tgdb
|
|
||||||
model
|
|
||||||
screen
|
|
||||||
util
|
|
||||||
sound)
|
|
||||||
|
|
||||||
foreach(component ${comps})
|
|
||||||
find_sg_component(${component} SIMGEAR_CORE_LIBRARIES)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
foreach(component ${scene_comps})
|
|
||||||
find_sg_component(${component} SIMGEAR_LIBRARIES)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
# again link order matters - scene libraries depend on core ones
|
# again link order matters - scene libraries depend on core ones
|
||||||
list(APPEND SIMGEAR_LIBRARIES ${SIMGEAR_CORE_LIBRARIES})
|
list(APPEND SIMGEAR_LIBRARIES ${SIMGEAR_CORE_LIBRARIES})
|
||||||
|
|
||||||
#message(STATUS "all libs ${SIMGEAR_LIBRARIES}")
|
|
||||||
|
|
||||||
set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES
|
set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
|
|
Loading…
Add table
Reference in a new issue