Mercurial > minori
diff CMakeLists.txt @ 103:621084cc542c
resources: add icons
also remove ye olde qdarkstyle, as it's not even used anymore
there's more configuring to OS X bundles now as well, along with
more version info on Windows
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 03 Nov 2023 22:52:41 -0400 |
parents | b315f3759c56 |
children | 6d8da6e64d61 |
line wrap: on
line diff
--- a/CMakeLists.txt Fri Nov 03 21:32:52 2023 -0400 +++ b/CMakeLists.txt Fri Nov 03 22:52:41 2023 -0400 @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(minori LANGUAGES CXX) +project(minori LANGUAGES CXX VERSION 0.1.0) -# this should check for the target system, rather than -# the host system, for cross-compiling purposes if(APPLE) enable_language(OBJCXX) endif() @@ -74,7 +72,6 @@ src/gui/pages/torrents.cc src/gui/pages/history.cc - # Custom widgets src/gui/widgets/anime_info.cc src/gui/widgets/poster.cc @@ -105,19 +102,39 @@ # Qt resources rc/icons.qrc - dep/darkstyle/darkstyle.qrc ) +set(RC_INFO_STRING "A lightweight anime tracker built with Qt.") + if(APPLE) # Mac OS X (or OS X (or macOS)) + set(MACOSX_BUNDLE_BUNDLE_NAME "Minori") + set(MACOSX_BUNDLE_BUNDLE_VERSION ${minori_VERSION}) + set(MACOSX_BUNDLE_COPYRIGHT "Copyright (C) Paper 2023") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.eu.us.paper.minori") + set(MACOSX_BUNDLE_INFO_STRING ${RC_INFO_STRING}) + set(MACOSX_BUNDLE_ICON_FILE rc/osx/favicon.icns) + set(app_icon_osx "${CMAKE_CURRENT_SOURCE_DIR}/rc/osx/favicon.icns") + set_source_files_properties(${app_icon_osx} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + list(APPEND SRC_FILES src/sys/osx/dark_theme.mm src/sys/osx/filesystem.mm + ${app_icon_osx} ) elseif(WIN32) # Windows - list(APPEND SRC_FILES src/sys/win32/dark_theme.cc) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/rc/win32/version.rc.in + ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc + @ONLY + ) + list(APPEND SRC_FILES + src/sys/win32/dark_theme.cc + rc/win32/resource.rc + ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc + ) endif() -add_executable(minori ${SRC_FILES}) +add_executable(minori WIN32 MACOSX_BUNDLE ${SRC_FILES}) set_property(TARGET minori PROPERTY CXX_STANDARD 11) set_property(TARGET minori PROPERTY AUTOMOC ON) set_property(TARGET minori PROPERTY AUTORCC ON)