Use the CMake folder tool to help IDEs groupt targets.

This is done as seen in http://athile.net/library/blog/?p=288

Hopefully this works in Visual Studio as KDevelop doesn't use this feature.
This commit is contained in:
Matt Williams
2012-08-12 04:29:51 +01:00
parent cc98c8e71a
commit b96309f4a4
11 changed files with 11 additions and 0 deletions

View File

@ -38,6 +38,7 @@ if(DOXYGEN_FOUND)
VERBATIM
)
set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE
set_property(TARGET doc PROPERTY FOLDER "library/doc")
#If we found qcollectiongenerator then do more processing
if(QT_QCOLLECTIONGENERATOR_EXECUTABLE)

View File

@ -122,6 +122,7 @@ IF(LIBRARY_TYPE STREQUAL "DYNAMIC")
ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES})
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS")
ENDIF()
SET_PROPERTY(TARGET PolyVoxCore PROPERTY FOLDER "library/PolyVoxCore")
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
IF(MSVC)

View File

@ -39,6 +39,7 @@ IF(LIBRARY_TYPE STREQUAL "DYNAMIC")
ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES})
SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS")
ENDIF()
SET_PROPERTY(TARGET PolyVoxUtil PROPERTY FOLDER "library/PolyVoxUtil")
TARGET_LINK_LIBRARIES(PolyVoxUtil PolyVoxCore)
SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})

View File

@ -25,6 +25,7 @@ if(ENABLE_BINDINGS)
swig_add_module(PolyVoxCore python PolyVoxCore.i)
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTY FOLDER "library/bindings")
else()
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)
endif()