comparison 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
comparison
equal deleted inserted replaced
102:b315f3759c56 103:621084cc542c
1 cmake_minimum_required(VERSION 3.16) 1 cmake_minimum_required(VERSION 3.16)
2 project(minori LANGUAGES CXX) 2 project(minori LANGUAGES CXX VERSION 0.1.0)
3 3
4 # this should check for the target system, rather than
5 # the host system, for cross-compiling purposes
6 if(APPLE) 4 if(APPLE)
7 enable_language(OBJCXX) 5 enable_language(OBJCXX)
8 endif() 6 endif()
9 7
10 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") 8 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
72 src/gui/pages/search.cc 70 src/gui/pages/search.cc
73 src/gui/pages/seasons.cc 71 src/gui/pages/seasons.cc
74 src/gui/pages/torrents.cc 72 src/gui/pages/torrents.cc
75 src/gui/pages/history.cc 73 src/gui/pages/history.cc
76 74
77
78 # Custom widgets 75 # Custom widgets
79 src/gui/widgets/anime_info.cc 76 src/gui/widgets/anime_info.cc
80 src/gui/widgets/poster.cc 77 src/gui/widgets/poster.cc
81 src/gui/widgets/clickable_label.cc 78 src/gui/widgets/clickable_label.cc
82 src/gui/widgets/sidebar.cc 79 src/gui/widgets/sidebar.cc
103 src/track/constants.cc 100 src/track/constants.cc
104 src/track/media.cc 101 src/track/media.cc
105 102
106 # Qt resources 103 # Qt resources
107 rc/icons.qrc 104 rc/icons.qrc
108 dep/darkstyle/darkstyle.qrc
109 ) 105 )
110 106
107 set(RC_INFO_STRING "A lightweight anime tracker built with Qt.")
108
111 if(APPLE) # Mac OS X (or OS X (or macOS)) 109 if(APPLE) # Mac OS X (or OS X (or macOS))
110 set(MACOSX_BUNDLE_BUNDLE_NAME "Minori")
111 set(MACOSX_BUNDLE_BUNDLE_VERSION ${minori_VERSION})
112 set(MACOSX_BUNDLE_COPYRIGHT "Copyright (C) Paper 2023")
113 set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.eu.us.paper.minori")
114 set(MACOSX_BUNDLE_INFO_STRING ${RC_INFO_STRING})
115 set(MACOSX_BUNDLE_ICON_FILE rc/osx/favicon.icns)
116 set(app_icon_osx "${CMAKE_CURRENT_SOURCE_DIR}/rc/osx/favicon.icns")
117 set_source_files_properties(${app_icon_osx} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
118
112 list(APPEND SRC_FILES 119 list(APPEND SRC_FILES
113 src/sys/osx/dark_theme.mm 120 src/sys/osx/dark_theme.mm
114 src/sys/osx/filesystem.mm 121 src/sys/osx/filesystem.mm
122 ${app_icon_osx}
115 ) 123 )
116 elseif(WIN32) # Windows 124 elseif(WIN32) # Windows
117 list(APPEND SRC_FILES src/sys/win32/dark_theme.cc) 125 configure_file(
126 ${CMAKE_CURRENT_SOURCE_DIR}/rc/win32/version.rc.in
127 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
128 @ONLY
129 )
130 list(APPEND SRC_FILES
131 src/sys/win32/dark_theme.cc
132 rc/win32/resource.rc
133 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
134 )
118 endif() 135 endif()
119 136
120 add_executable(minori ${SRC_FILES}) 137 add_executable(minori WIN32 MACOSX_BUNDLE ${SRC_FILES})
121 set_property(TARGET minori PROPERTY CXX_STANDARD 11) 138 set_property(TARGET minori PROPERTY CXX_STANDARD 11)
122 set_property(TARGET minori PROPERTY AUTOMOC ON) 139 set_property(TARGET minori PROPERTY AUTOMOC ON)
123 set_property(TARGET minori PROPERTY AUTORCC ON) 140 set_property(TARGET minori PROPERTY AUTORCC ON)
124 141
125 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src dep/animia/include dep/anitomy dep) 142 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src dep/animia/include dep/anitomy dep)