Mercurial > minori
view CMakeLists.txt @ 62:4c6dd5999b39
*: update
1. updated animia
2. use widestrings for filesystem on Windows
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 06:16:06 -0400 |
parents | 3c802806b74a |
children | 3d2decf093bb |
line wrap: on
line source
cmake_minimum_required(VERSION 3.16) project(minori LANGUAGES CXX) # this should check for the target system, rather than # the host system, for cross-compiling purposes if(APPLE) enable_language(OBJCXX) endif() add_subdirectory(dep/anitomy) # add_subdirectory(dep/animia) add_subdirectory(dep/pugixml) # Fix for mingw64 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") if(USE_QT6) find_package(Qt6 COMPONENTS Widgets REQUIRED) else() find_package(Qt5 COMPONENTS Widgets REQUIRED) endif() find_package(CURL REQUIRED) set(LIBRARIES ${CURL_LIBRARIES} anitomy ) if(USE_QT6) list(APPEND LIBRARIES ${Qt6Widgets_LIBRARIES}) else() list(APPEND LIBRARIES ${Qt5Widgets_LIBRARIES}) endif() # We need Cocoa for some OS X stuff if(APPLE) find_library(COCOA_LIBRARY Cocoa) list(APPEND LIBRARIES ${COCOA_LIBRARY}) endif() set(SRC_FILES # Main entrypoint src/main.cpp # Core files and datatype declarations... src/core/anime.cpp src/core/anime_db.cpp src/core/config.cpp src/core/date.cpp src/core/filesystem.cpp src/core/json.cpp src/core/strings.cpp src/core/time.cpp # Main window src/gui/window.cpp src/gui/dark_theme.cpp # Main window pages src/gui/pages/anime_list.cpp src/gui/pages/now_playing.cpp src/gui/pages/statistics.cpp src/gui/pages/search.cpp src/gui/pages/seasons.cpp src/gui/pages/torrents.cpp src/gui/pages/history.cpp # Custom widgets src/gui/widgets/sidebar.cpp src/gui/widgets/text.cpp src/gui/widgets/optional_date.cpp # Dialogs src/gui/dialog/about.cpp src/gui/dialog/information.cpp src/gui/dialog/settings.cpp src/gui/dialog/settings/application.cpp src/gui/dialog/settings/services.cpp # Translate src/gui/translate/anime.cpp src/gui/translate/anilist.cpp # Services (only AniList for now) src/services/services.cpp src/services/anilist.cpp # Qt resources rc/icons.qrc dep/darkstyle/darkstyle.qrc ) if(APPLE) # Mac OS X (or OS X (or macOS)) list(APPEND SRC_FILES src/sys/osx/dark_theme.mm src/sys/osx/filesystem.mm ) elseif(WIN32) # Windows list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) endif() add_executable(minori ${SRC_FILES}) # There's a bug in JFMC++ that keeps me from setting this to C++11. set_property(TARGET minori PROPERTY CXX_STANDARD 17) set_property(TARGET minori PROPERTY AUTOMOC ON) set_property(TARGET minori PROPERTY AUTORCC ON) target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src dep/animia/include) if(USE_QT6) target_include_directories(minori PUBLIC ${Qt6Widgets_INCLUDE_DIRS}) else() target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS}) endif() target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override) if(APPLE) target_compile_definitions(minori PUBLIC MACOSX) elseif(WIN32) target_compile_definitions(minori PUBLIC WIN32) endif() target_link_libraries(minori ${LIBRARIES})