Outputs App Bundle on macOS (#282)

This commit is contained in:
Putta Khunchalee 2023-07-31 23:40:29 +07:00 committed by GitHub
parent a6adcec59f
commit 686989698c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

2
.vscode/launch.json vendored
View File

@ -16,7 +16,7 @@
"program": "${workspaceFolder}/build/src/obliteration"
},
"osx": {
"program": "${workspaceFolder}/build/src/obliteration"
"program": "${workspaceFolder}/build/src/Obliteration.app/Contents/MacOS/Obliteration"
}
},
{

View File

@ -65,7 +65,7 @@ ExternalProject_Add(core
add_dependencies(core llvm)
# Setup application target.
add_executable(obliteration WIN32
add_executable(obliteration WIN32 MACOSX_BUNDLE
ansi_escape.cpp
app_data.cpp
game_models.cpp
@ -91,10 +91,18 @@ add_dependencies(obliteration core)
set_target_properties(obliteration PROPERTIES AUTOMOC ON AUTORCC ON)
if(WIN32)
if(WIN32 OR APPLE)
set_target_properties(obliteration PROPERTIES OUTPUT_NAME Obliteration)
endif()
if(APPLE)
set_target_properties(obliteration PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER io.github.obhq.obliteration)
set_target_properties(obliteration PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME Obliteration)
set_target_properties(obliteration PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION 0.1.0)
set_target_properties(obliteration PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING 0.1.0)
set_target_properties(obliteration PROPERTIES MACOSX_BUNDLE_COPYRIGHT "Copyright © 2023 Obliteration Contributors")
endif()
target_compile_features(obliteration PRIVATE cxx_std_17)
target_link_libraries(obliteration PRIVATE Qt6::Widgets)