From 13b6adee5653d733c2c1d2031fb20a774802a1fe Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 5 Oct 2016 00:35:14 -0700 Subject: [PATCH] Qt: Tiny CMake cleanup --- src/platform/qt/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index a39c45513..cb98d95e9 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -175,16 +175,19 @@ endif() if(USE_GDB_STUB) list(APPEND PLATFORM_SRC GDBController.cpp GDBWindow.cpp) endif() -set(MACOSX_BUNDLE_ICON_FILE mgba.icns) -set(MACOSX_BUNDLE_BUNDLE_VERSION ${LIB_VERSION_STRING}) -set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) -set(MACOSX_BUNDLE_GUI_IDENTIFIER com.endrift.${BINARY_NAME}-qt) -set_source_files_properties(${CMAKE_SOURCE_DIR}/res/mgba.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) qt5_add_resources(RESOURCES resources.qrc) +if(APPLE) + set(MACOSX_BUNDLE_ICON_FILE mgba.icns) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${LIB_VERSION_STRING}) + set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) + set(MACOSX_BUNDLE_GUI_IDENTIFIER com.endrift.${BINARY_NAME}-qt) + set_source_files_properties(${CMAKE_SOURCE_DIR}/res/mgba.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) +endif() if(WIN32) configure_file(${CMAKE_SOURCE_DIR}/res/mgba.rc.in ${CMAKE_BINARY_DIR}/res/mgba.rc) list(APPEND RESOURCES ${CMAKE_BINARY_DIR}/res/mgba.rc) + set_source_files_properties(${CMAKE_BINARY_DIR}/res/mgba.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/res/mgba.ico) if(QT_STATIC) list(APPEND QT_LIBRARIES qwindows Qt5PlatformSupport imm32) endif()