Mercurial > minori
comparison CMakeLists.txt @ 202:71832ffe425a
animia: re-add kvm fd source
this is all being merged from my wildly out-of-date laptop. SORRY!
in other news, I edited the CI file to install the wayland client
as well, so the linux CI build might finally get wayland stuff.
| author | Paper <paper@paper.us.eu.org> | 
|---|---|
| date | Tue, 02 Jan 2024 06:05:06 -0500 | 
| parents | 8f6f8dd2eb23 975a3f0965e2 | 
| children | 53211cb1e7f5 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 201:8f6f8dd2eb23 | 202:71832ffe425a | 
|---|---|
| 1 cmake_minimum_required(VERSION 3.18) | 1 cmake_minimum_required(VERSION 3.18) | 
| 2 project(minori LANGUAGES CXX VERSION 0.1.0) | 2 project(minori LANGUAGES CXX VERSION 0.1.0) | 
| 3 | |
| 4 if(APPLE) | |
| 5 enable_language(OBJCXX) | |
| 6 endif() | |
| 7 | 3 | 
| 8 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 4 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 
| 9 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 5 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 
| 10 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 6 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | 
| 11 | 7 | 
| 41 pugixml | 37 pugixml | 
| 42 ) | 38 ) | 
| 43 | 39 | 
| 44 # We need Cocoa for some OS X stuff | 40 # We need Cocoa for some OS X stuff | 
| 45 if(APPLE) | 41 if(APPLE) | 
| 46 find_library(COCOA_LIBRARY Cocoa) | 42 find_library(FOUNDATION_LIBRARY Foundation) | 
| 47 list(APPEND LIBRARIES ${COCOA_LIBRARY}) | 43 find_library(APPKIT_LIBRARY AppKit) | 
| 44 list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) | |
| 48 endif() | 45 endif() | 
| 49 | 46 | 
| 50 set(SRC_FILES | 47 set(SRC_FILES | 
| 51 # Main entrypoint | 48 # Main entrypoint | 
| 52 src/main.cc | 49 src/main.cc | 
| 101 # Services (only AniList for now) | 98 # Services (only AniList for now) | 
| 102 src/services/services.cc | 99 src/services/services.cc | 
| 103 src/services/anilist.cc | 100 src/services/anilist.cc | 
| 104 | 101 | 
| 105 # Tracking | 102 # Tracking | 
| 106 src/track/constants.cc | |
| 107 src/track/media.cc | 103 src/track/media.cc | 
| 108 | 104 | 
| 109 # Qt resources | 105 # Qt resources | 
| 110 rc/icons.qrc | 106 rc/icons.qrc | 
| 111 rc/dark.qrc | 107 rc/dark.qrc | 
| 125 rc/locale/es.ts | 121 rc/locale/es.ts | 
| 126 ) | 122 ) | 
| 127 | 123 | 
| 128 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale") | 124 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale") | 
| 129 | 125 | 
| 130 # dumb little hack to get this working on Qt5 and Qt6 | |
| 131 if(UPDATE_TRANSLATIONS) | 126 if(UPDATE_TRANSLATIONS) | 
| 132 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/include") | 127 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/include") | 
| 133 endif() | 128 endif() | 
| 134 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES}) | 129 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES}) | 
| 135 list(APPEND SRC_FILES ${QM_FILES}) | 130 list(APPEND SRC_FILES ${QM_FILES}) | 
| 160 set(MACOSX_BUNDLE_ICON_FILE rc/osx/favicon.icns) | 155 set(MACOSX_BUNDLE_ICON_FILE rc/osx/favicon.icns) | 
| 161 set(app_icon_osx "${CMAKE_CURRENT_SOURCE_DIR}/rc/osx/favicon.icns") | 156 set(app_icon_osx "${CMAKE_CURRENT_SOURCE_DIR}/rc/osx/favicon.icns") | 
| 162 set_source_files_properties(${app_icon_osx} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") | 157 set_source_files_properties(${app_icon_osx} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") | 
| 163 | 158 | 
| 164 list(APPEND SRC_FILES | 159 list(APPEND SRC_FILES | 
| 165 src/sys/osx/dark_theme.mm | 160 src/sys/osx/dark_theme.cc | 
| 166 src/sys/osx/filesystem.mm | 161 src/sys/osx/filesystem.cc | 
| 167 ${app_icon_osx} | 162 ${app_icon_osx} | 
| 168 ) | 163 ) | 
| 169 elseif(WIN32) # Windows | 164 elseif(WIN32) # Windows | 
| 170 configure_file( | 165 configure_file( | 
| 171 ${CMAKE_CURRENT_SOURCE_DIR}/rc/win32/version.rc.in | 166 ${CMAKE_CURRENT_SOURCE_DIR}/rc/win32/version.rc.in | 
| 197 | 192 | 
| 198 target_include_directories(minori PUBLIC ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE ${INCLUDE}) | 193 target_include_directories(minori PUBLIC ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE ${INCLUDE}) | 
| 199 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast) | 194 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast) | 
| 200 if(APPLE) | 195 if(APPLE) | 
| 201 target_compile_definitions(minori PUBLIC MACOSX) | 196 target_compile_definitions(minori PUBLIC MACOSX) | 
| 197 set_target_properties(minori PROPERTIES MACOSX_BUNDLE TRUE) | |
| 202 elseif(WIN32) | 198 elseif(WIN32) | 
| 203 target_compile_definitions(minori PUBLIC WIN32) | 199 target_compile_definitions(minori PUBLIC WIN32) | 
| 204 endif() | 200 endif() | 
| 205 target_link_libraries(minori ${LIBRARIES}) | 201 target_link_libraries(minori ${LIBRARIES}) | 
| 206 | 202 | 
