1
0
Fork 0

Fixes for linking with shared SimGear.

This commit is contained in:
James Turner 2011-11-29 10:24:33 +00:00
parent 62810e3f9a
commit f054f15693
4 changed files with 16 additions and 9 deletions

View file

@ -116,6 +116,7 @@ if(SIMGEAR_SHARED)
set(SIMGEAR_CORE_LIBRARIES ${SIMGEAR_SHARED_CORE_LIBRARY})
set(SIMGEAR_LIBRARIES ${SIMGEAR_SHARED_SCENE_LIBRARY} ${SIMGEAR_SHARED_CORE_LIBRARY})
set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES "")
set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES "")
else(SIMGEAR_SHARED)
@ -127,17 +128,13 @@ else(SIMGEAR_SHARED)
# linked in, and hence ability to link when using a traditional
# linker such as GNU ld on Linux
set(comps
tsync
environment
nasal
bucket
bvh
util
route
timing
io
serial
sound
math
props
structure
@ -149,12 +146,16 @@ else(SIMGEAR_SHARED)
)
set(scene_comps
tsync
ephem
sky
material
tgdb
model
screen)
screen
bvh
util
sound)
foreach(component ${comps})
find_sg_component(${component} SIMGEAR_CORE_LIBRARIES)
@ -171,6 +172,11 @@ else(SIMGEAR_SHARED)
${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARY})
set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES
${ALUT_LIBRARY}
${OPENAL_LIBRARY}
${LIBSVN_LIBRARIES})
if(WIN32)
list(APPEND SIMGEAR_CORE_LIBRARY_DEPENDENCIES ws2_32.lib)
endif(WIN32)

View file

@ -25,7 +25,7 @@
#include <simgear/compiler.h>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/project.hxx>
#include <simgear/scene/util/project.hxx>
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>

View file

@ -73,14 +73,12 @@ target_link_libraries(fgfs
${FG_LIBS}
${SIMGEAR_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${ALUT_LIBRARY}
${OPENAL_LIBRARY}
${OPENGL_LIBRARIES}
${PLIB_LIBRARIES}
${JPEG_LIBRARY}
${LIBSVN_LIBRARIES}
${HLA_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES}
${PLATFORM_LIBS}
)

View file

@ -13,6 +13,7 @@ target_link_libraries(GPSsmooth
${PLIB_SG_LIBRARY}
${PLIB_UL_LIBRARY}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
${ZLIB_LIBRARY}
${WINMM_LIBRARY}
)
@ -21,6 +22,7 @@ target_link_libraries(MIDGsmooth
${PLIB_SG_LIBRARY}
${PLIB_UL_LIBRARY}
${WINMM_LIBRARY}
${ZLIB_LIBRARY}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)
@ -29,6 +31,7 @@ target_link_libraries(UGsmooth
${PLIB_SG_LIBRARY}
${PLIB_UL_LIBRARY}
${WINMM_LIBRARY}
${ZLIB_LIBRARY}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)