2 file(WRITE ${PROJECT_BINARY_DIR}/simgear/version.h "#define SIMGEAR_VERSION ${SIMGEAR_VERSION}")
23 add_subdirectory(${mylibfolder})
25 endforeach( mylibfolder )
27 if (NOT SIMGEAR_HEADLESS)
28 add_subdirectory(environment)
29 add_subdirectory(screen)
30 add_subdirectory(scene)
31 add_subdirectory(sound)
36 set(HEADERS compiler.h constants.h sg_inlines.h ${PROJECT_BINARY_DIR}/simgear/version.h)
37 install (FILES ${HEADERS} DESTINATION include/simgear/)
40 message(STATUS "building shared library")
41 get_property(allSources GLOBAL PROPERTY ALL_SOURCES)
42 get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
44 add_library(SimGear SHARED ${allSources})
45 set_property(TARGET SimGear PROPERTY FRAMEWORK 1)
46 message(STATUS "public header: ${publicHeaders}")
47 set_property(TARGET SimGear PROPERTY PUBLIC_HEADER "${publicHeaders}")
48 set_property(TARGET SimGear PROPERTY LINKER_LANGUAGE CXX)
50 target_link_libraries(SimGear ${ZLIB_LIBRARY}
51 ${OPENSCENEGRAPH_LIBRARIES}
52 ${OPENAL_LIBRARY} ${ALUT_LIBRARY}
55 install(TARGETS SimGear LIBRARY DESTINATION lib${LIB_SUFFIX}
56 PUBLIC_HEADER DESTINATION include/simgear)