forked from H-uru/Plasma
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup plClient CMake project a bit
- Loading branch information
Showing
2 changed files
with
22 additions
and
36 deletions.
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 |
---|---|---|
|
@@ -90,7 +90,7 @@ if(WIN32) | |
win32/res/headspin.ico | ||
) | ||
elseif(APPLE) | ||
set(plClient_SOURCES ${plClient_SOURCES} | ||
list(APPEND plClient_SOURCES | ||
Mac-Cocoa/main.mm | ||
Mac-Cocoa/NSString+StringTheory.mm | ||
Mac-Cocoa/PLSKeyboardEventMonitor.mm | ||
|
@@ -100,7 +100,7 @@ elseif(APPLE) | |
Mac-Cocoa/PLSPatcher.mm | ||
Mac-Cocoa/PLSServerStatus.mm | ||
) | ||
set(plClient_HEADERS ${plClient_HEADERS} | ||
list(APPEND plClient_HEADERS | ||
Mac-Cocoa/NSString+StringTheory.h | ||
Mac-Cocoa/PLSKeyboardEventMonitor.h | ||
Mac-Cocoa/PLSView.h | ||
|
@@ -109,28 +109,29 @@ elseif(APPLE) | |
Mac-Cocoa/PLSPatcher.h | ||
Mac-Cocoa/PLSServerStatus.h | ||
) | ||
set(RESOURCES | ||
list(APPEND plClient_RESOURCES | ||
Mac-Cocoa/Assets.xcassets | ||
Mac-Cocoa/banner.png | ||
Mac-Cocoa/[email protected] | ||
Mac-Cocoa/MainMenu.xib | ||
Mac-Cocoa/PLSLoginWindowController.xib | ||
Mac-Cocoa/PLSPatcherWindowController.xib | ||
Mac-Cocoa/banner.png | ||
Mac-Cocoa/[email protected] | ||
win32/res/Dirt.ICO | ||
) | ||
|
||
list(APPEND plClient_RESOURCES | ||
win32/res/Dirt.ICO | ||
) | ||
else() | ||
list(APPEND plClient_SOURCES | ||
main.cpp | ||
) | ||
endif() | ||
|
||
plasma_executable(plClient CLIENT INSTALL_PDB | ||
SOURCES | ||
${plClient_SOURCES} ${plClient_HEADERS} | ||
${plClient_TEXT} ${plClient_RESOURCES} | ||
) | ||
|
||
if(APPLE) | ||
plasma_executable(plClient CLIENT INSTALL_PDB SOURCES ${plClient_SOURCES} ${plClient_HEADERS} ${RESOURCES}) | ||
target_sources(plClient PRIVATE ${plClient_IBSOURCES}) | ||
set_target_properties(plClient PROPERTIES | ||
BUNDLE TRUE | ||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Mac-Cocoa/Info.plist.in" | ||
# Hard coding the app name here intentionally. | ||
# Should prevent macOS from tripping over secured resources being | ||
|
@@ -141,42 +142,28 @@ if(APPLE) | |
MACOSX_BUNDLE_GUI_IDENTIFIER org.Huru.UruExplorer | ||
MACOSX_BUNDLE_BUNDLE_VERSION "0.1" | ||
MACOSX_BUNDLE_SHORT_VERSION_STRING "0.1" | ||
RESOURCE "${plClient_RESOURCES} ${plClient_IBSOURCES}" | ||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon | ||
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" | ||
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] "YES" | ||
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=RelWithDebInfo] "YES" | ||
XCODE_ATTRIBUTE_MTL_HEADER_SEARCH_PATHS ${Plasma_SOURCE_DIR}/Sources/Plasma/NucleusLib/inc/ | ||
XCODE_ATTRIBUTE_MTL_HEADER_SEARCH_PATHS "${Plasma_SOURCE_DIR}/Sources/Plasma/NucleusLib/inc/" | ||
XCODE_ATTRIBUTE_INSTALL_PATH "/Applications" | ||
XCODE_ATTRIBUTE_SKIP_INSTALL "NO" | ||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/Mac-Cocoa/plClient.entitlements | ||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Mac-Cocoa/plClient.entitlements" | ||
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES" | ||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES" | ||
) | ||
target_compile_options(plClient PRIVATE -fobjc-arc) | ||
target_sources(plClient PRIVATE Mac-Cocoa/Assets.xcassets) | ||
set_source_files_properties(Mac-Cocoa/Assets.xcassets ${RESOURCES} PROPERTIES | ||
MACOSX_PACKAGE_LOCATION Resources | ||
) | ||
target_link_libraries(plClient PRIVATE "-framework Cocoa") | ||
target_link_libraries(plClient PRIVATE "-framework QuartzCore") | ||
install( | ||
TARGETS plClient | ||
DESTINATION client | ||
) | ||
|
||
|
||
if(PLASMA_APPLE_DEVELOPMENT_TEAM_ID) | ||
set_target_properties(plClient PROPERTIES | ||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Development" | ||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${PLASMA_APPLE_DEVELOPMENT_TEAM_ID} | ||
) | ||
endif() | ||
else() | ||
plasma_executable(plClient WIN32 CLIENT INSTALL_PDB | ||
SOURCES | ||
${plClient_SOURCES} ${plClient_HEADERS} | ||
${plClient_TEXT} ${plClient_RESOURCES} | ||
) | ||
endif() | ||
|
||
if(PLASMA_BUILD_RESOURCE_DAT) | ||
|
@@ -240,6 +227,8 @@ target_link_libraries( | |
$<$<BOOL:${PLASMA_PIPELINE_DX}>:pfDXPipeline> | ||
$<$<BOOL:${PLASMA_PIPELINE_GL}>:pfGLPipeline> | ||
CURL::libcurl | ||
"$<$<PLATFORM_ID:Darwin>:-framework Cocoa>" | ||
"$<$<PLATFORM_ID:Darwin>:-framework QuartzCore>" | ||
) | ||
target_include_directories(plClient PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
||
|
@@ -269,4 +258,4 @@ endif() | |
source_group("Source Files" FILES ${plClient_SOURCES}) | ||
source_group("Header Files" FILES ${plClient_HEADERS}) | ||
source_group("Text" FILES ${plClient_TEXT}) | ||
source_group("Windows Resource Files" FILES ${plClient_RESOURCES}) | ||
source_group("Resources" FILES ${plClient_RESOURCES}) |
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