2 file(WRITE ${PROJECT_BINARY_DIR}/simgear/version.h "#define SIMGEAR_VERSION ${SIMGEAR_VERSION}")
22 add_subdirectory(${mylibfolder})
24 endforeach( mylibfolder )
26 if(NOT SIMGEAR_HEADLESS)
27 add_subdirectory(environment)
28 add_subdirectory(screen)
29 add_subdirectory(scene)
30 add_subdirectory(sound)
31 endif(NOT SIMGEAR_HEADLESS)
39 set(HEADERS compiler.h constants.h sg_inlines.h ${PROJECT_BINARY_DIR}/simgear/version.h)
40 install (FILES ${HEADERS} DESTINATION include/simgear/)
43 message(STATUS "building shared library")
44 get_property(coreSources GLOBAL PROPERTY CORE_SOURCES)
45 get_property(sceneSources GLOBAL PROPERTY SCENE_SOURCES)
46 get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
48 add_library(SimGearCore SHARED ${coreSources})
49 set_property(TARGET SimGearCore PROPERTY COMPILE_FLAGS "-DNO_OPENSCENEGRAPH_INTERFACE=1")
51 # set_property(TARGET SimGearCore PROPERTY FRAMEWORK 1)
52 # message(STATUS "public header: ${publicHeaders}")
53 # set_property(TARGET SimGearCore PROPERTY PUBLIC_HEADER "${publicHeaders}")
54 set_property(TARGET SimGearCore PROPERTY LINKER_LANGUAGE CXX)
56 set_property(TARGET SimGearCore PROPERTY VERSION ${SIMGEAR_VERSION})
57 set_property(TARGET SimGearCore PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
59 target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY})
60 install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
62 if(NOT SIMGEAR_HEADLESS)
64 add_definitions(${APR_CFLAGS})
67 set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
69 include_directories(${LIBSVN_INCLUDE_DIR})
73 list(APPEND sceneSources scene/util/SGCoreOSGDependant.cxx)
75 add_library(SimGearScene SHARED ${sceneSources})
76 # set_property(TARGET SimGearScene PROPERTY FRAMEWORK 1)
77 # set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
78 set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
79 set_property(TARGET SimGearScene PROPERTY VERSION ${SIMGEAR_VERSION})
80 set_property(TARGET SimGearScene PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
82 target_link_libraries(SimGearScene
85 ${OPENSCENEGRAPH_LIBRARIES}
86 ${OPENAL_LIBRARY} ${ALUT_LIBRARY}
91 target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
94 install(TARGETS SimGearScene LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})