Qt: Tiny CMake cleanup

This commit is contained in:
Jeffrey Pfau 2016-10-05 00:35:14 -07:00
parent 74d140ed8b
commit 13b6adee56
1 changed files with 8 additions and 5 deletions

View File

@ -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()