mirror of
https://github.com/transmission/transmission
synced 2025-01-03 05:25:52 +00:00
Group source files for better structure in IDEs (Xcode, VS)
This commit is contained in:
parent
deca70db6d
commit
064c12f28b
4 changed files with 23 additions and 1 deletions
|
@ -94,6 +94,8 @@ if(ENABLE_NLS)
|
|||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.metainfo.xml.in
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
source_group("Generated Files" FILES ${${PROJECT_NAME}_DESKTOP_FILE} ${${PROJECT_NAME}_METAINFO_FILE})
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
|
|
|
@ -23,6 +23,7 @@ macro(tr_wrap_xib IFILE OFILE)
|
|||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
source_group("Generated Files" FILES ${OFILE})
|
||||
endmacro()
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
|
@ -181,6 +182,7 @@ set(${PROJECT_NAME}_XIB_FILES
|
|||
StatusBar.xib
|
||||
URLSheetWindow.xib
|
||||
)
|
||||
source_group(Resources FILES ${${PROJECT_NAME}_XIB_FILES})
|
||||
|
||||
set(${PROJECT_NAME}_RESOURCES
|
||||
Defaults.plist
|
||||
|
@ -189,6 +191,7 @@ set(${PROJECT_NAME}_RESOURCES
|
|||
../COPYING
|
||||
Images/TransmissionDocument.icns
|
||||
)
|
||||
source_group(Resources FILES ${${PROJECT_NAME}_RESOURCES})
|
||||
|
||||
set_source_files_properties(${${PROJECT_NAME}_RESOURCES} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources
|
||||
|
@ -296,6 +299,7 @@ add_custom_command(
|
|||
DEPENDS ${IMAGE_ASSETS}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
source_group("Generated Files" FILES ${COMPILED_IMAGE_ASSETS} ${APPICON_NAME}.Info.plist)
|
||||
|
||||
list(APPEND ${PROJECT_NAME}_RESOURCES ${COMPILED_IMAGE_ASSETS})
|
||||
|
||||
|
@ -359,6 +363,7 @@ foreach(F ${${PROJECT_NAME}_LANG_XIB_FILES})
|
|||
tr_wrap_xib("${F_XIB}" "${F_NIB}")
|
||||
list(APPEND ${PROJECT_NAME}_BASE_XIB_FILES "${F_XIB}")
|
||||
list(APPEND ${PROJECT_NAME}_BASE_NIB_FILES "${F_NIB}")
|
||||
source_group(Resources/Base.lproj FILES ${F_XIB})
|
||||
endforeach()
|
||||
|
||||
foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
||||
|
@ -372,6 +377,7 @@ foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
|||
foreach(F ${${PROJECT_NAME}_LANG_STRINGS_FILES})
|
||||
list(APPEND ${PROJECT_NAME}_${LANG}_STRINGS_FILES ${LANG}.lproj/${F})
|
||||
endforeach()
|
||||
source_group(Resources/${LANG}.lproj FILES ${${PROJECT_NAME}_${LANG}_STRINGS_FILES})
|
||||
endforeach()
|
||||
|
||||
include_directories(
|
||||
|
|
|
@ -36,6 +36,7 @@ set(${PROJECT_NAME}_LANG_STRINGS_FILES
|
|||
set(${PROJECT_NAME}_RESOURCES
|
||||
style.css
|
||||
)
|
||||
source_group(Resources FILES ${${PROJECT_NAME}_RESOURCES})
|
||||
|
||||
set_source_files_properties(${${PROJECT_NAME}_RESOURCES} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
@ -48,6 +49,7 @@ foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
|||
set_source_files_properties(${${PROJECT_NAME}_${LANG}_STRINGS_FILES} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources/${LANG}.lproj)
|
||||
endforeach()
|
||||
source_group(Resources/${LANG}.lproj FILES ${${PROJECT_NAME}_${LANG}_STRINGS_FILES})
|
||||
endforeach()
|
||||
|
||||
add_library(${TR_NAME}-mac-ql MODULE
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
project(trqt)
|
||||
|
||||
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
|
||||
set_property(GLOBAL PROPERTY AUTOMOC_SOURCE_GROUP "Generated Files")
|
||||
set_property(GLOBAL PROPERTY AUTORCC_SOURCE_GROUP "Generated Files")
|
||||
set_property(GLOBAL PROPERTY AUTOUIC_SOURCE_GROUP "Generated Files")
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
AboutDialog.cc
|
||||
AddData.cc
|
||||
|
@ -120,7 +125,7 @@ set(${PROJECT_NAME}_HEADERS
|
|||
WatchDir.h
|
||||
)
|
||||
|
||||
tr_qt_wrap_ui(${PROJECT_NAME}_UI_SOURCES
|
||||
set(${PROJECT_NAME}_UI_FILES
|
||||
AboutDialog.ui
|
||||
DetailsDialog.ui
|
||||
LicenseDialog.ui
|
||||
|
@ -134,13 +139,19 @@ tr_qt_wrap_ui(${PROJECT_NAME}_UI_SOURCES
|
|||
StatsDialog.ui
|
||||
TrackersDialog.ui
|
||||
)
|
||||
source_group(Ui FILES ${${PROJECT_NAME}_UI_FILES})
|
||||
|
||||
tr_qt_wrap_ui(${PROJECT_NAME}_UI_SOURCES ${${PROJECT_NAME}_UI_FILES})
|
||||
source_group("Generated Files" FILES ${${PROJECT_NAME}_UI_SOURCES})
|
||||
|
||||
set(${PROJECT_NAME}_QRC_FILES application.qrc)
|
||||
if(WIN32 OR APPLE)
|
||||
list(APPEND ${PROJECT_NAME}_QRC_FILES icons/Faenza/Faenza.qrc)
|
||||
endif()
|
||||
source_group(Resources FILES ${${PROJECT_NAME}_QRC_FILES})
|
||||
|
||||
tr_qt_add_resources(${PROJECT_NAME}_QRC_SOURCES ${${PROJECT_NAME}_QRC_FILES})
|
||||
source_group("Generated Files" FILES ${${PROJECT_NAME}_QRC_SOURCES})
|
||||
|
||||
set(${PROJECT_NAME}_LINGUAS
|
||||
af
|
||||
|
@ -188,6 +199,7 @@ endforeach()
|
|||
|
||||
if(${PROJECT_NAME}_TS_FILES)
|
||||
tr_qt_add_translation(${PROJECT_NAME}_QM_FILES ${${PROJECT_NAME}_TS_FILES})
|
||||
source_group("Generated Files" FILES ${${PROJECT_NAME}_QM_FILES})
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
|
|
Loading…
Reference in a new issue