]> git.mxchange.org Git - simgear.git/blob - simgear/CMakeLists.txt
Add the hla directory to the cmake build system.
[simgear.git] / simgear / CMakeLists.txt
1
2 file(WRITE ${PROJECT_BINARY_DIR}/simgear/version.h "#define SIMGEAR_VERSION ${SIMGEAR_VERSION}")
3
4 foreach( mylibfolder 
5         bucket
6         debug
7         ephemeris
8         hla
9         io
10         magvar
11         math
12         misc
13         nasal
14         props
15         route
16         serial
17         structure
18         threads
19         timing
20         xml
21     )
22
23     add_subdirectory(${mylibfolder})
24
25 endforeach( mylibfolder )
26
27 if (NOT SIMGEAR_HEADLESS)
28     add_subdirectory(environment)
29     add_subdirectory(screen)
30     add_subdirectory(scene)
31     add_subdirectory(sound)
32 endif()
33
34
35
36 set(HEADERS compiler.h constants.h sg_inlines.h ${PROJECT_BINARY_DIR}/simgear/version.h)
37 install (FILES ${HEADERS}  DESTINATION include/simgear/)
38
39 if(SIMGEAR_SHARED)
40     message(STATUS "building shared library")
41     get_property(allSources GLOBAL PROPERTY ALL_SOURCES)
42     get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
43
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)
49         
50     target_link_libraries(SimGear ${ZLIB_LIBRARY} 
51                         ${OPENSCENEGRAPH_LIBRARIES} 
52                         ${OPENAL_LIBRARY} ${ALUT_LIBRARY}
53                         ${OPENGL_LIBRARY})
54                         
55     install(TARGETS SimGear LIBRARY DESTINATION lib${LIB_SUFFIX}
56                             PUBLIC_HEADER DESTINATION include/simgear)
57 endif(SIMGEAR_SHARED)
58