]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Organize CMake generated projects into solution folders.
authorStephen Ma <tehphen@gmail.com>
Sat, 19 Dec 2015 22:56:05 +0000 (14:56 -0800)
committerStephen Ma <tehphen@gmail.com>
Mon, 21 Dec 2015 17:46:01 +0000 (09:46 -0800)
CMakeLists.txt

index 92be94b60baa443d2d92d4cf0a7e5129ca875453..40889b35e77a66b7af25a27512805c48544c89c7 100644 (file)
@@ -15,6 +15,8 @@ endif()
 
 include_directories(${CMAKE_CURRENT_LIST_DIR})
 
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
 set(ENTITYX_BUILD_TESTING true CACHE BOOL "Enable building of tests.")
 set(ENTITYX_RUN_BENCHMARKS false CACHE BOOL "Run benchmarks (in conjunction with -DENTITYX_BUILD_TESTING=1).")
 set(ENTITYX_MAX_COMPONENTS 64 CACHE STRING "Set the maximum number of components.")
@@ -96,6 +98,7 @@ macro(create_test TARGET_NAME SOURCE)
         entityx
         ${ARGN}
         )
+    set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "entityx/tests")
     add_test(${TARGET_NAME} ${TARGET_NAME})
 endmacro()
 
@@ -122,7 +125,7 @@ set(install_libs entityx)
 
 set(sources entityx/System.cc entityx/Event.cc entityx/Entity.cc entityx/help/Timer.cc entityx/help/Pool.cc)
 add_library(entityx STATIC ${sources})
-set_target_properties(entityx PROPERTIES DEBUG_POSTFIX -d)
+set_target_properties(entityx PROPERTIES DEBUG_POSTFIX -d FOLDER entityx)
 
 if (ENTITYX_BUILD_SHARED)
     message("-- Building shared libraries (-DENTITYX_BUILD_SHARED=0 to only build static librarires)")
@@ -134,7 +137,8 @@ if (ENTITYX_BUILD_SHARED)
         OUTPUT_NAME entityx
         DEBUG_POSTFIX -d
         VERSION ${ENTITYX_VERSION}
-        SOVERSION ${ENTITYX_MAJOR_VERSION})
+        SOVERSION ${ENTITYX_MAJOR_VERSION}
+        FOLDER entityx)
     list(APPEND install_libs entityx_shared)
 endif (ENTITYX_BUILD_SHARED)