From 12ec7c50c72eca6826cdf33a36a99342bcf2be7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Ro=C3=9F?= Date: Wed, 3 Jul 2024 19:55:04 +0200 Subject: [PATCH] [CMake] Enabled the CMake property USE_FOLDERS to provide a more structured project list in IDEs with the help of set(CMAKE_FOLDER "...") calls. --- CMakeLists.txt | 2 ++ Descent3/tests/CMakeLists.txt | 2 ++ md5/tests/CMakeLists.txt | 2 ++ misc/tests/CMakeLists.txt | 2 ++ netcon/CMakeLists.txt | 4 +++- netgames/CMakeLists.txt | 2 ++ scripts/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 ++ third_party/CMakeLists.txt | 2 ++ 9 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 529a7605..56295e70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,8 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + if(FORCE_COLORED_OUTPUT) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) set(CMAKE_COLOR_DIAGNOSTICS ON) diff --git a/Descent3/tests/CMakeLists.txt b/Descent3/tests/CMakeLists.txt index 38cf2a56..cb1a1793 100644 --- a/Descent3/tests/CMakeLists.txt +++ b/Descent3/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_FOLDER "tests") + add_executable( porting-tests porting-tests.cpp diff --git a/md5/tests/CMakeLists.txt b/md5/tests/CMakeLists.txt index bf2241d3..736b8ae2 100644 --- a/md5/tests/CMakeLists.txt +++ b/md5/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_FOLDER "tests") + add_executable( md5_tests ../md5.cpp diff --git a/misc/tests/CMakeLists.txt b/misc/tests/CMakeLists.txt index 4049758d..12f99433 100644 --- a/misc/tests/CMakeLists.txt +++ b/misc/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_FOLDER "tests") + add_executable( misc_tests misc_tests.cpp diff --git a/netcon/CMakeLists.txt b/netcon/CMakeLists.txt index 91ed89dc..8e15468f 100644 --- a/netcon/CMakeLists.txt +++ b/netcon/CMakeLists.txt @@ -1,4 +1,6 @@ +set(CMAKE_FOLDER "netcon") + include_directories("includes") add_subdirectory(inetfile) add_subdirectory(lanclient) -add_subdirectory(mtclient) \ No newline at end of file +add_subdirectory(mtclient) diff --git a/netgames/CMakeLists.txt b/netgames/CMakeLists.txt index b8460e82..18de0e0a 100644 --- a/netgames/CMakeLists.txt +++ b/netgames/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_FOLDER "netgames") + include_directories("includes") add_subdirectory(dmfc) add_subdirectory(anarchy) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 936115f0..414c50ca 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -set(CMAKE_FOLDER "Scripts") +set(CMAKE_FOLDER "scripts") set(CPPS $<$: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5c2c08aa..dd22143a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_FOLDER "tests") + add_executable( byteswap_tests byteswap_tests.cpp diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 6c3f5c8b..6d8a49a5 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -1 +1,3 @@ +set(CMAKE_FOLDER "third_party") + add_subdirectory(stb)