diff --git a/CMakeLists.txt b/CMakeLists.txt index a5220aa3b052dfc8b37e05d11f784fdf719c04d6..a3722bace30f50973ac53dec9939428902d14b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.8.12) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) enable_testing() diff --git a/External/CMakeLists.txt b/External/CMakeLists.txt index d43cf9d0c5983b4ae9c8554e6e0eadb085ca0719..5180ea569310d3a5581ea7fe334a02d5a17dcc84 100644 --- a/External/CMakeLists.txt +++ b/External/CMakeLists.txt @@ -10,6 +10,24 @@ elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) endif(WIN32) add_subdirectory(googletest) + set(GTEST_TARGETS + gtest + gtest_main + gmock + gmock_main + ) + foreach(target ${GTEST_TARGETS}) + set_property(TARGET ${target} PROPERTY FOLDER gtest) + endforeach() + mark_as_advanced(gmock_build_tests + BUILD_GMOCK + BUILD_GTEST + BUILD_SHARED_LIBS + gtest_build_samples + gtest_build_tests + gtest_disable_pthreads + gtest_force_shared_crt + gtest_hide_internal_symbols) else() message(STATUS "Google Mock was not found - tests based on that will not build") diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt index 14afbd908c1d3bdedbfab081ab8a3b07dd739c51..4954db9458472bfefe9f741a9859de6fdc7c9d97 100644 --- a/OGLCompilersDLL/CMakeLists.txt +++ b/OGLCompilersDLL/CMakeLists.txt @@ -1,6 +1,7 @@ set(SOURCES InitializeDll.cpp InitializeDll.h) add_library(OGLCompiler STATIC ${SOURCES}) +set_property(TARGET OGLCompiler PROPERTY FOLDER glslang) if(WIN32) source_group("Source" FILES ${SOURCES}) diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index 88d89da01bea004af73fd093f4671978fa7d3aec..cdd92820cb98284b0d0c42469dc22eb00f193516 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -17,6 +17,7 @@ set(HEADERS disassemble.h) add_library(SPIRV STATIC ${SOURCES} ${HEADERS}) +set_property(TARGET SPIRV PROPERTY FOLDER glslang) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS}) diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt index e02a465f27d72ebeb182cb4c6f625f4d7b808f17..cd173c6cf85d471b2735cfa52581fc64ab9d4665 100644 --- a/StandAlone/CMakeLists.txt +++ b/StandAlone/CMakeLists.txt @@ -1,6 +1,8 @@ add_library(glslang-default-resource-limits ${CMAKE_CURRENT_SOURCE_DIR}/DefaultResourceLimits.cpp ) +set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) + target_include_directories(glslang-default-resource-limits PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${PROJECT_SOURCE_DIR} @@ -11,6 +13,8 @@ set(REMAPPER_SOURCES spirv-remap.cpp) add_executable(glslangValidator ${SOURCES}) add_executable(spirv-remap ${REMAPPER_SOURCES}) +set_property(TARGET glslangValidator PROPERTY FOLDER tools) +set_property(TARGET spirv-remap PROPERTY FOLDER tools) set(LIBRARIES glslang diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 52c781a85b8588bb74a974fd9435a10bc108ed94..7015e304b658bb69e92749f45dcb6805053b1f23 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -75,6 +75,7 @@ set(HEADERS # set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) +set_property(TARGET glslang PROPERTY FOLDER glslang) if(WIN32) source_group("Public" REGULAR_EXPRESSION "Public/*") diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt index f4d1b4257c4a170c90cb41b29373b9cbe9b03815..174cc9167e07e6f412d9bf00e1e0500784ff82e1 100644 --- a/glslang/OSDependent/Unix/CMakeLists.txt +++ b/glslang/OSDependent/Unix/CMakeLists.txt @@ -1,4 +1,5 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h) +set_property(TARGET OSDependent PROPERTY FOLDER glslang) install(TARGETS OSDependent ARCHIVE DESTINATION lib) diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt index 2df014cc9b28faefbfa92cf049247a72ad8c7897..399760c30a7d0ed38d204f18d09b53a2cbdc6080 100644 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt @@ -1,6 +1,7 @@ set(SOURCES ossource.cpp ../osinclude.h) add_library(OSDependent STATIC ${SOURCES}) +set_property(TARGET OSDependent PROPERTY FOLDER glslang) # MinGW GCC complains about function pointer casts to void*. # Turn that off with -fpermissive. diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt index 7f477d61cee3dc844ca151c324b6f277fbe9e6b6..75f0b4eab7e07b83cc29ec962031b3f7843dea1b 100644 --- a/gtests/CMakeLists.txt +++ b/gtests/CMakeLists.txt @@ -18,6 +18,7 @@ if (TARGET gmock) ) add_executable(glslangtests ${TEST_SOURCES}) + set_property(TARGET glslangtests PROPERTY FOLDER tests) target_compile_definitions(glslangtests PRIVATE GLSLANG_TEST_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/../Test") target_include_directories(glslangtests PRIVATE diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt index e4a0bd3297094625b99ffc0c719a34d936b5c3ef..5e39b4554fa17f90d5096240ddd06f42ac3f72e4 100755 --- a/hlsl/CMakeLists.txt +++ b/hlsl/CMakeLists.txt @@ -14,6 +14,7 @@ set(HEADERS hlslGrammar.h) add_library(HLSL STATIC ${SOURCES} ${HEADERS}) +set_property(TARGET HLSL PROPERTY FOLDER hlsl) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS})