Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create folder hierarchy in IDE project views #1612

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ set(PRODUCT_UUID "ea489821-6c35-4bd0-9dae-bb17c585e680"
option(PRODUCT_EMBED_BUILD_INFO "Embed build revision information into plProduct" ON)
cmake_dependent_option(PRODUCT_EMBED_BUILD_TIME "Embed build time into plProduct" ON [[PRODUCT_EMBED_BUILD_INFO]] OFF)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_FOLDER "CMakePredefinedTargets")

# HeadSpin Configuration

# Define HS_DEBUGGING for debug builds
Expand Down Expand Up @@ -188,6 +191,7 @@ include_directories(${PROJECT_BINARY_DIR})
if(PLASMA_BUILD_TOOLS)
# Custom dummy target for compiling all tools
add_custom_target(tools)
set_target_properties(tools PROPERTIES XCODE_GENERATE_SCHEME TRUE)
endif()

include(TestBigEndian)
Expand All @@ -205,12 +209,8 @@ set(PLASMA_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/Sources/Plasma")
set(PLASMA_TOOLS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/Sources/Tools")
set(PLASMA_MAX_PLUGIN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/Sources/MaxPlugin")

add_subdirectory(Scripts)
add_subdirectory(Sources/Plasma)

if(PLASMA_BUILD_TOOLS)
add_subdirectory(Sources/Tools)
endif()
add_subdirectory(Scripts)

if(PLASMA_BUILD_MAX_PLUGIN)
add_subdirectory(Sources/MaxPlugin)
Expand All @@ -222,6 +222,10 @@ if(PLASMA_BUILD_TESTS)
add_subdirectory(Sources/Tests EXCLUDE_FROM_ALL)
endif(PLASMA_BUILD_TESTS)

if(PLASMA_BUILD_TOOLS)
add_subdirectory(Sources/Tools)
endif()

# This must be called only after all Qt targets are declared
plasma_deploy_qt()

Expand Down
1 change: 1 addition & 0 deletions Scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ source_group("Ages" FILES ${GameData})
add_custom_target(Scripts
SOURCES ${GameScripts} ${GameSDL} ${GameData}
)
set_target_properties(Scripts PROPERTIES FOLDER "")

install(
DIRECTORY "Python/"
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxComponent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ set(MaxComponent_SOURCES
)

plasma_library(MaxComponent
FOLDER MaxPlugin
SOURCES ${MaxComponent_HEADERS} ${MaxComponent_RESOURCES} ${MaxComponent_SOURCES}
UNITY_BUILD
PRECOMPILED_HEADERS Pch.h
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxConvert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ set(MaxConvert_SOURCES
)

plasma_library(MaxConvert
FOLDER MaxPlugin
SOURCES ${MaxConvert_HEADERS} ${MaxConvert_SOURCES}
PRECOMPILED_HEADERS Pch.h
NO_SANITIZE # The 3ds Max headers are full of clang diagnostic errors.
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxExport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(MaxExport_SOURCES
)

plasma_library(MaxExport
FOLDER MaxPlugin
SOURCES ${MaxExport_HEADERS} ${MaxExport_SOURCES}
PRECOMPILED_HEADERS Pch.h
NO_SANITIZE # The 3ds Max headers are full of clang diagnostic errors.
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ set(MaxMain_SOURCES
)

plasma_library(MaxMain SHARED
FOLDER MaxPlugin
SOURCES ${MaxMain_HEADERS} ${MaxMain_RESOURCES} ${MaxMain_SOURCES}
PRECOMPILED_HEADERS Pch.h
NO_SANITIZE # The 3ds Max headers are full of clang diagnostic errors.
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxPlasmaLights/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set(MaxPlasmaLights_SOURCES
)

plasma_library(MaxPlasmaLights SHARED
FOLDER MaxPlugin
SOURCES ${MaxPlasmaLights_HEADERS} ${MaxPlasmaLights_RESOURCES} ${MaxPlasmaLights_SOURCES}
PRECOMPILED_HEADERS Pch.h
NO_SANITIZE # The 3ds Max headers are full of clang diagnostic errors.
Expand Down
1 change: 1 addition & 0 deletions Sources/MaxPlugin/MaxPlasmaMtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ set(MaxPlasmaMtls_SOURCES_Materials
)

plasma_library(MaxPlasmaMtls
FOLDER MaxPlugin
SOURCES ${MaxPlasmaMtls_HEADERS}
${MaxPlasmaMtls_HEADERS_Layers}
${MaxPlasmaMtls_HEADERS_Materials}
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/Apps/SoundDecompress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ if(SoundDecompress_MOULa_Mode)
list(APPEND SoundDecompress_HEADERS plOldAudioFileReader.h)
endif()

plasma_executable(SoundDecompress TOOL SOURCES ${SoundDecompress_SOURCES})
plasma_executable(SoundDecompress TOOL
FOLDER Apps
SOURCES ${SoundDecompress_SOURCES}
)
target_link_libraries(
SoundDecompress
PRIVATE
Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/Apps/plClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ else()
endif()

plasma_executable(plClient CLIENT INSTALL_PDB
FOLDER Apps
SOURCES
${plClient_SOURCES} ${plClient_HEADERS}
${plClient_TEXT} ${plClient_RESOURCES}
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/Apps/plCrashHandler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ set(plCrashHandler_RESOURCES
resource.h
)

plasma_executable(plCrashHandler WIN32 CLIENT SOURCES ${plCrashHandler_SOURCES} ${plCrashHandler_RESOURCES})
plasma_executable(plCrashHandler CLIENT
FOLDER Apps
SOURCES ${plCrashHandler_SOURCES} ${plCrashHandler_RESOURCES}
)
target_link_libraries(
plCrashHandler
PRIVATE
Expand Down
3 changes: 2 additions & 1 deletion Sources/Plasma/Apps/plUruLauncher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ set(plUruLauncher_RESOURCES
Dirt.ICO
)

plasma_executable(plUruLauncher WIN32 CLIENT
plasma_executable(plUruLauncher CLIENT
FOLDER Apps
SOURCES
${plUruLauncher_SOURCES} ${plUruLauncher_HEADERS}
${plUruLauncher_RESOURCES}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Plasma/CoreLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ set(CoreLib_HEADERS
)

plasma_library(CoreLib
FOLDER CoreLib
SOURCES ${CoreLib_SOURCES} ${CoreLib_HEADERS}
PRECOMPILED_HEADERS _CoreLibPch.h
)
Expand Down Expand Up @@ -113,4 +114,5 @@ add_custom_target(pcBuildInfo
COMMAND ${BUILD_INFO_COMMAND}
BYPRODUCTS "${BUILD_INFO_FILE}"
)
set_target_properties(pcBuildInfo PROPERTIES FOLDER CoreLib)
add_dependencies(CoreLib pcBuildInfo)
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/inc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
set(pfFeatureInc_HEADERS
pfAllCreatables.h
)
plasma_library(pfFeatureInc OBJECT SOURCES ${pfFeatureInc_HEADERS})
plasma_library(pfFeatureInc OBJECT
FOLDER FeatureLib
SOURCES ${pfFeatureInc_HEADERS}
)
target_link_libraries(pfFeatureInc
PUBLIC
pfAnimation
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfAnimation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ set(pfAnimation_HEADERS
plViewFaceModifier.h
)

plasma_library(pfAnimation SOURCES ${pfAnimation_SOURCES} ${pfAnimation_HEADERS})
plasma_library(pfAnimation
FOLDER FeatureLib
SOURCES ${pfAnimation_SOURCES} ${pfAnimation_HEADERS}
)
target_link_libraries(
pfAnimation
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfAudio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ set(pfAudio_HEADERS
plRandomSoundMod.h
)

plasma_library(pfAudio SOURCES ${pfAudio_SOURCES} ${pfAudio_HEADERS})
plasma_library(pfAudio
FOLDER FeatureLib
SOURCES ${pfAudio_SOURCES} ${pfAudio_HEADERS}
)
target_link_libraries(
pfAudio
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfCamera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ set(pfCamera_HEADERS
plVirtualCamNeu.h
)

plasma_library(pfCamera SOURCES ${pfCamera_SOURCES} ${pfCamera_HEADERS})
plasma_library(pfCamera
FOLDER FeatureLib
SOURCES ${pfCamera_SOURCES} ${pfCamera_HEADERS}
)
target_link_libraries(
pfCamera
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfCharacter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ set(pfCharacter_HEADERS
pfMarkerMgr.h
)

plasma_library(pfCharacter SOURCES ${pfCharacter_SOURCES} ${pfCharacter_HEADERS})
plasma_library(pfCharacter
FOLDER FeatureLib
SOURCES ${pfCharacter_SOURCES} ${pfCharacter_HEADERS}
)
target_link_libraries(
pfCharacter
PUBLIC
Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/FeatureLib/pfConditional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(pfConditional_HEADERS
)

plasma_library(pfConditional
FOLDER FeatureLib
SOURCES ${pfConditional_SOURCES} ${pfConditional_HEADERS}
UNITY_BUILD
PRECOMPILED_HEADERS Pch.h
Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/FeatureLib/pfConsole/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(pfConsole_HEADERS
)

plasma_library(pfConsole
FOLDER FeatureLib
SOURCES ${pfConsole_SOURCES} ${pfConsole_HEADERS}
PRECOMPILED_HEADERS Pch.h
)
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfConsoleCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ set(pfConsoleCore_HEADERS
pfConsoleParser.h
)

plasma_library(pfConsoleCore SOURCES ${pfConsoleCore_SOURCES} ${pfConsoleCore_HEADERS})
plasma_library(pfConsoleCore
FOLDER FeatureLib
SOURCES ${pfConsoleCore_SOURCES} ${pfConsoleCore_HEADERS}
)
target_link_libraries(
pfConsoleCore
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfCrashHandler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ else()
)
endif()

plasma_library(pfCrashHandler SOURCES ${pfCrashHandler_SOURCES} ${pfCrashHandler_HEADERS})
plasma_library(pfCrashHandler
FOLDER FeatureLib
SOURCES ${pfCrashHandler_SOURCES} ${pfCrashHandler_HEADERS}
)
target_link_libraries(
pfCrashHandler
PUBLIC
Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/FeatureLib/pfDXPipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ set(pfDXPipeline_HEADERS
)

plasma_library(pfDXPipeline
FOLDER FeatureLib
SOURCES ${pfDXPipeline_SOURCES} ${pfDXPipeline_HEADERS}
PRECOMPILED_HEADERS Pch.h
)
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfGLPipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ set(pfGLPipeline_HEADERS
plGLPlateManager.h
)

plasma_library(pfGLPipeline SOURCES ${pfGLPipeline_SOURCES} ${pfGLPipeline_HEADERS})
plasma_library(pfGLPipeline
FOLDER FeatureLib
SOURCES ${pfGLPipeline_SOURCES} ${pfGLPipeline_HEADERS}
)
target_link_libraries(pfGLPipeline
PUBLIC
CoreLib
Expand Down
1 change: 1 addition & 0 deletions Sources/Plasma/FeatureLib/pfGameGUIMgr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ set(pfGameGUIMgr_HEADERS
)

plasma_library(pfGameGUIMgr
FOLDER FeatureLib
SOURCES ${pfGameGUIMgr_SOURCES} ${pfGameGUIMgr_HEADERS}
UNITY_BUILD
PRECOMPILED_HEADERS Pch.h
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfGameMgr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ set(pfGameMgr_SOURCES
pfGmMarker.cpp
)

plasma_library(pfGameMgr SOURCES ${pfGameMgr_HEADERS} ${pfGameMgr_SOURCES})
plasma_library(pfGameMgr
FOLDER FeatureLib
SOURCES ${pfGameMgr_HEADERS} ${pfGameMgr_SOURCES}
)
target_link_libraries(
pfGameMgr
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfGameScoreMgr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ set(pfGameScoreMgr_HEADERS
pfGameScoreMgr.h
)

plasma_library(pfGameScoreMgr SOURCES ${pfGameScoreMgr_SOURCES} ${pfGameScoreMgr_HEADERS})
plasma_library(pfGameScoreMgr
FOLDER FeatureLib
SOURCES ${pfGameScoreMgr_SOURCES} ${pfGameScoreMgr_HEADERS}
)
target_link_libraries(
pfGameScoreMgr
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfJournalBook/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ set(pfJournalBook_HEADERS
pfJournalBookCreatable.h
)

plasma_library(pfJournalBook SOURCES ${pfJournalBook_SOURCES} ${pfJournalBook_HEADERS})
plasma_library(pfJournalBook
FOLDER FeatureLib
SOURCES ${pfJournalBook_SOURCES} ${pfJournalBook_HEADERS}
)
target_link_libraries(
pfJournalBook
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfLocalizationMgr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ set(pfLocalizationMgr_HEADERS
pfLocalizedString.h
)

plasma_library(pfLocalizationMgr SOURCES ${pfLocalizationMgr_SOURCES} ${pfLocalizationMgr_HEADERS})
plasma_library(pfLocalizationMgr
FOLDER FeatureLib
SOURCES ${pfLocalizationMgr_SOURCES} ${pfLocalizationMgr_HEADERS}
)

target_link_libraries(
pfLocalizationMgr
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfMessage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ set(pfMessage_HEADERS
plClothingMsg.h
)

plasma_library(pfMessage SOURCES ${pfMessage_SOURCES} ${pfMessage_HEADERS})
plasma_library(pfMessage
FOLDER FeatureLib
SOURCES ${pfMessage_SOURCES} ${pfMessage_HEADERS}
)
target_link_libraries(
pfMessage
PUBLIC
Expand Down
7 changes: 6 additions & 1 deletion Sources/Plasma/FeatureLib/pfMetalPipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ set(pfMetalPipeline_HEADERS
pfMetalPipelineCreatable.h
)

plasma_library(pfMetalPipeline SOURCES ${pfMetalPipeline_SOURCES} ${pfMetalPipeline_HEADERS})
plasma_library(pfMetalPipeline
FOLDER FeatureLib
SOURCES ${pfMetalPipeline_SOURCES} ${pfMetalPipeline_HEADERS}
)
target_link_libraries(pfMetalPipeline
PUBLIC
CoreLib
Expand Down Expand Up @@ -98,6 +101,7 @@ set_target_properties(pfMetalPipelineShadersMSL21 PROPERTIES
XCODE_ATTRIBUTE_MTL_FAST_MATH "YES"
XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=Debug] "INCLUDE_SOURCE"
XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=RelWithDebInfo] "INCLUDE_SOURCE"
FOLDER FeatureLib
)
set_target_properties(pfMetalPipelineShadersMSL23 PROPERTIES
XCODE_PRODUCT_TYPE com.apple.product-type.metal-library
Expand All @@ -108,6 +112,7 @@ set_target_properties(pfMetalPipelineShadersMSL23 PROPERTIES
XCODE_ATTRIBUTE_MTL_FAST_MATH "YES"
XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=Debug] "INCLUDE_SOURCE"
XCODE_ATTRIBUTE_MTL_ENABLE_DEBUG_INFO[variant=RelWithDebInfo] "INCLUDE_SOURCE"
FOLDER FeatureLib
)
set_source_files_properties(${pfMetalPipeline_SHADERS} TARGET_DIRECTORY pfMetalPipelineShadersMSL21 PROPERTIES LANGUAGE METAL)
set_source_files_properties(${pfMetalPipeline_SHADERS} TARGET_DIRECTORY pfMetalPipelineShadersMSL23 PROPERTIES LANGUAGE METAL)
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ set(pfMoviePlayer_HEADERS
plPlanarImage.h
)

plasma_library(pfMoviePlayer SOURCES ${pfMoviePlayer_SOURCES} ${pfMoviePlayer_HEADERS})
plasma_library(pfMoviePlayer
FOLDER FeatureLib
SOURCES ${pfMoviePlayer_SOURCES} ${pfMoviePlayer_HEADERS}
)
target_link_libraries(
pfMoviePlayer
PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion Sources/Plasma/FeatureLib/pfPasswordStore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ elseif(TARGET Security::Security)
list(APPEND pfPasswordStore_SOURCES pfPasswordStore_Apple.cpp)
endif()

plasma_library(pfPasswordStore SOURCES ${pfPasswordStore_HEADERS} ${pfPasswordStore_SOURCES})
plasma_library(pfPasswordStore
FOLDER FeatureLib
SOURCES ${pfPasswordStore_HEADERS} ${pfPasswordStore_SOURCES}
)
target_link_libraries(
pfPasswordStore
PUBLIC
Expand Down
Loading