Group certain cmake targets into folders

This makes folders in IDEs for certain Mac and gettext targets, reducing
the number of targets which appear at top-level.
This commit is contained in:
ridiculousfish 2021-03-21 13:29:41 -07:00
parent 1b950f5f3b
commit 43cc99e1ba
2 changed files with 6 additions and 0 deletions

View file

@ -73,3 +73,6 @@ add_custom_target(signed_fish_macapp
$<TARGET_BUNDLE_DIR:fish_macapp>
VERBATIM
)
# Group our targets in a folder.
set_property(TARGET fish_macapp signed_fish_macapp PROPERTY FOLDER macapp)

View file

@ -15,12 +15,15 @@ add_feature_info(gettext GETTEXT_FOUND "translate messages with gettext")
# Define translations
if(GETTEXT_FOUND)
# Group pofile targets into their own folder, as there's a lot of them.
set(CMAKE_FOLDER pofiles)
foreach(lang ${languages})
# Our translations aren't set up entirely as CMake expects, so installation is done in
# cmake/Install.cmake instead of using INSTALL_DESTINATION
gettext_process_po_files(${lang} ALL
PO_FILES po/${lang}.po)
endforeach()
set(CMAKE_FOLDER)
endif()
cmake_push_check_state()