]> git.mxchange.org Git - simgear.git/blobdiff - CMakeModules/SimGearComponent.cmake
hla: Add propper attribute dirty handling.
[simgear.git] / CMakeModules / SimGearComponent.cmake
index c05d3241daf5e8f0ea1d9aa6057e374ca49604cb..1c11b855b9d61ccca8a86b813d5bbc568860459d 100644 (file)
@@ -1,10 +1,10 @@
 
-macro(simgear_component name includePath sources headers)
-
+macro(simgear_component_common name includePath sourcesList sources headers)
     if (SIMGEAR_SHARED)
+
         foreach(s ${sources})
             set_property(GLOBAL
-                APPEND PROPERTY ALL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
+                APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
         endforeach()
 
                foreach(h ${headers})
@@ -17,7 +17,15 @@ macro(simgear_component name includePath sources headers)
         add_library(${libName} STATIC ${sources} ${headers})
 
         install (TARGETS ${libName} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-        install (FILES ${headers}  DESTINATION include/simgear/${includePath})
     endif()
     
+    install (FILES ${headers}  DESTINATION include/simgear/${includePath})
 endmacro()
+
+function(simgear_component name includePath sources headers)
+    simgear_component_common(${name} ${includePath} CORE_SOURCES "${sources}" "${headers}")
+endfunction()
+
+function(simgear_scene_component name includePath sources headers)
+    simgear_component_common(${name} ${includePath} SCENE_SOURCES "${sources}" "${headers}")
+endfunction()