Create app bundle if building on macOS

This commit is contained in:
Luca D'Amico 2021-02-25 12:50:10 +01:00 committed by GitHub
parent 1b7e29a7b0
commit 573fc3b3cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,10 @@ set(FORMS
aboutdialog.ui
)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${FORMS})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${SOURCES} ${HEADERS} ${FORMS})
else()
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${FORMS})
endif()
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets)