aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Ma <tehphen@gmail.com>2015-12-19 14:56:05 -0800
committerStephen Ma <tehphen@gmail.com>2015-12-21 09:46:01 -0800
commit0d027a6d860581a48108566f28b99290bbff668e (patch)
tree4c4d9c12e59508b249af018c51d2ec1b768f054a
parent881297f6411c594a48a218bef75b73d7bffde8e1 (diff)
Organize CMake generated projects into solution folders.
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92be94b..40889b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)