]> git.mxchange.org Git - simgear.git/commitdiff
Sort fgfs source files in IDE folders - Don't work for headers though
authorFrederic Bouvier <fredfgfs01@free.fr>
Sun, 16 Sep 2012 19:19:11 +0000 (21:19 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Sun, 16 Sep 2012 19:19:11 +0000 (21:19 +0200)
CMakeModules/SimGearComponent.cmake
simgear/CMakeLists.txt

index 294a53a21e1c86df8fac45dcf0ba01127e5798db..00944de39f958943711aa0261260cc0aeb24b39f 100644 (file)
@@ -1,14 +1,21 @@
 
 macro(simgear_component_common name includePath sourcesList sources headers)
+    set(fc${sourcesList} ${name})
+    set(fh${sourcesList} ${name})
     foreach(s ${sources})
         set_property(GLOBAL
             APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
+        set(fc${sourcesList} "${fc${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${s}")
     endforeach()
 
        foreach(h ${headers})
                set_property(GLOBAL
                        APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
+        set(fh${sourcesList} "${fh${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${h}")
        endforeach()
+
+    set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_C "${fc${sourcesList}}@")
+    set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_H "${fh${sourcesList}}@")
     
     install (FILES ${headers}  DESTINATION include/simgear/${includePath})
 endmacro()
index 62f4a4052a0a4e385d56c22794e256e2ae955ede..3885643447874107f356cc080c51f2fdb6e6621b 100644 (file)
@@ -90,11 +90,47 @@ if(SIMGEAR_SHARED)
     install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 else()
     message(STATUS "Library building mode: STATIC LIBRARIES")
-    
+
+       get_property(FG_GROUPS_CORE_SOURCES_C GLOBAL PROPERTY FG_GROUPS_CORE_SOURCES_C)
+       string(REPLACE "@" ";" groups ${FG_GROUPS_CORE_SOURCES_C} )
+       foreach(g ${groups})
+               string(REPLACE "#" ";" g2 ${g})
+               list(GET g2 0 name)
+               list(REMOVE_AT g2 0)
+               source_group("${name}\\Sources" FILES ${g2})
+       endforeach()
+
+       get_property(FG_GROUPS_CORE_SOURCES_H GLOBAL PROPERTY FG_GROUPS_CORE_SOURCES_H)
+       string(REPLACE "@" ";" groups ${FG_GROUPS_CORE_SOURCES_H} )
+       foreach(g ${groups})
+               string(REPLACE "#" ";" g2 ${g})
+               list(GET g2 0 name)
+               list(REMOVE_AT g2 0)
+               source_group("${name}\\Headers" FILES ${g2})
+       endforeach()
+
     add_library(SimGearCore STATIC ${coreSources})
     install(TARGETS SimGearCore ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     
     if(NOT SIMGEAR_HEADLESS)
+               get_property(FG_GROUPS_SCENE_SOURCES_C GLOBAL PROPERTY FG_GROUPS_SCENE_SOURCES_C)
+               string(REPLACE "@" ";" groups ${FG_GROUPS_SCENE_SOURCES_C} )
+               foreach(g ${groups})
+                       string(REPLACE "#" ";" g2 ${g})
+                       list(GET g2 0 name)
+                       list(REMOVE_AT g2 0)
+                       source_group("${name}\\Sources" FILES ${g2})
+               endforeach()
+
+               get_property(FG_GROUPS_SCENE_SOURCES_H GLOBAL PROPERTY FG_GROUPS_SCENE_SOURCES_H)
+               string(REPLACE "@" ";" groups ${FG_GROUPS_SCENE_SOURCES_H} )
+               foreach(g ${groups})
+                       string(REPLACE "#" ";" g2 ${g})
+                       list(GET g2 0 name)
+                       list(REMOVE_AT g2 0)
+                       source_group("${name}\\Headers" FILES ${g2})
+               endforeach()
+
         add_library(SimGearScene STATIC ${sceneSources})
         install(TARGETS SimGearScene ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif(NOT SIMGEAR_HEADLESS)