-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bensuperpc <[email protected]>
- Loading branch information
1 parent
e45e0b9
commit bea28b7
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,5 @@ cmake-build-*/ | |
prefix/ | ||
CMakeLists.txt.user | ||
CMakeUserPresets.json | ||
project-include-after.cmake | ||
old/* | ||
.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This file is run at the end of every project() call | ||
|
||
# Top level setup to set folder property for targets to be grouped in IDEs that | ||
# support folders | ||
if(PROJECT_NAME STREQUAL "GTA_SA_cheat_finder") | ||
set(FOLDER_GTA_SA_cheat_finder Project) | ||
set(FOLDER_GTA_SA_cheat_finderTests Test) | ||
|
||
function(project_set_folder_property) | ||
set(var "FOLDER_${PROJECT_NAME}") | ||
if(NOT DEFINED "${var}") | ||
# message(FATAL_ERROR "Variable '${var}' does not exist") | ||
message(WARNING "Variable '${var}' does not exist") | ||
endif() | ||
get_property(targets DIRECTORY PROPERTY BUILDSYSTEM_TARGETS) | ||
foreach(target IN LISTS targets) | ||
get_property(folder TARGET "${target}" PROPERTY FOLDER) | ||
if(DEFINED folder) | ||
continue() | ||
endif() | ||
set(folder UtilityTargets) | ||
get_property(type TARGET "${target}" PROPERTY TYPE) | ||
if(NOT type STREQUAL "UTILITY") | ||
set(folder "${${var}}Targets") | ||
endif() | ||
set_property(TARGET "${target}" PROPERTY FOLDER "${folder}") | ||
endforeach() | ||
endfunction() | ||
|
||
set_property(GLOBAL PROPERTY USE_FOLDERS YES) | ||
endif() | ||
|
||
cmake_language(DEFER CALL project_set_folder_property) |