]> git.mxchange.org Git - simgear.git/blob - CMakeModules/SimGearComponent.cmake
Merge branch 'next' of git://gitorious.org/fg/simgear into next
[simgear.git] / CMakeModules / SimGearComponent.cmake
1
2 macro(simgear_component name includePath sources headers)
3
4     if (SIMGEAR_SHARED)
5         foreach(s ${sources})
6             set_property(GLOBAL
7                 APPEND PROPERTY ALL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
8         endforeach()
9
10                 foreach(h ${headers})
11                         set_property(GLOBAL
12                                 APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
13                 endforeach()
14         
15     else()
16         set(libName "sg${name}")
17         add_library(${libName} STATIC ${sources} )
18
19         install (TARGETS ${libName} ARCHIVE DESTINATION lib${LIB_SUFFIX})
20         install (FILES ${headers}  DESTINATION include/simgear/${includePath})
21     endif()
22     
23 endmacro()