comparison CMakeLists.txt @ 9:5c0397762b53

INCOMPLETE: megacommit :)
author Paper <mrpapersonic@gmail.com>
date Sun, 10 Sep 2023 03:59:16 -0400
parents 07a9095eaeed
children 4b198a111713
comparison
equal deleted inserted replaced
8:b1f73678ef61 9:5c0397762b53
1 cmake_minimum_required(VERSION 3.16) 1 cmake_minimum_required(VERSION 3.16)
2 project(weeaboo LANGUAGES CXX OBJCXX) 2 project(weeaboo LANGUAGES CXX OBJCXX)
3 3
4 add_subdirectory(dep/anitomy)
5
4 set(SRC_FILES 6 set(SRC_FILES
7 # Main entrypoint
5 src/main.cpp 8 src/main.cpp
6 src/config.cpp 9
7 src/filesystem.cpp 10 # Core files and datatype declarations...
8 src/anilist.cpp 11 src/core/anime.cpp
9 src/anime.cpp 12 src/core/anime_db.cpp
10 src/json.cpp 13 src/core/config.cpp
11 src/date.cpp 14 src/core/date.cpp
12 src/time.cpp 15 src/core/filesystem.cpp
13 src/sidebar.cpp 16 src/core/json.cpp
14 src/progress.cpp 17 src/core/strings.cpp
15 src/pages/anime_list.cpp 18 src/core/time.cpp
16 src/pages/now_playing.cpp 19
17 src/pages/statistics.cpp 20 # GUI stuff
18 src/dialog/settings.cpp 21 src/gui/window.cpp
19 src/dialog/information.cpp 22 src/gui/sidebar.cpp
20 src/dialog/settings/services.cpp 23 src/gui/ui_utils.cpp
21 src/dialog/settings/application.cpp 24
22 src/ui_utils.cpp 25 # Dialogs
23 src/string_utils.cpp 26 src/gui/dialog/information.cpp
27 src/gui/dialog/settings.cpp
28 src/gui/dialog/settings/application.cpp
29 src/gui/dialog/settings/services.cpp
30
31 # Main window pages
32 src/gui/pages/anime_list.cpp
33 src/gui/pages/now_playing.cpp
34 src/gui/pages/statistics.cpp
35
36 # Services (only AniList for now)
37 src/services/anilist.cpp
38
39 # Qt resources
24 rc/icons.qrc 40 rc/icons.qrc
25 dep/darkstyle/darkstyle.qrc 41 dep/darkstyle/darkstyle.qrc
26 ) 42 )
27 43
28 if(APPLE) 44 if(APPLE) # Mac OS X (or OS X (or macOS))
29 list(APPEND SRC_FILES 45 list(APPEND SRC_FILES
30 src/sys/osx/dark_theme.mm 46 src/sys/osx/dark_theme.mm
31 src/sys/osx/filesystem.mm 47 src/sys/osx/filesystem.mm
32 ) 48 )
33 elseif(WIN32) 49 elseif(WIN32) # Windows
34 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) 50 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp)
35 endif() 51 endif()
36 52
37 add_executable(weeaboo MACOSX_BUNDLE ${SRC_FILES}) 53 add_executable(weeaboo ${SRC_FILES})
38 set_property(TARGET weeaboo PROPERTY CXX_STANDARD 20) 54 set_property(TARGET weeaboo PROPERTY CXX_STANDARD 20)
39 set_property(TARGET weeaboo PROPERTY AUTOMOC ON) 55 set_property(TARGET weeaboo PROPERTY AUTOMOC ON)
40 set_property(TARGET weeaboo PROPERTY AUTORCC ON) 56 set_property(TARGET weeaboo PROPERTY AUTORCC ON)
41 57
42 find_package(Qt5 COMPONENTS Widgets REQUIRED) 58 find_package(Qt5 COMPONENTS Widgets REQUIRED)
43 find_package(CURL REQUIRED) 59 find_package(CURL REQUIRED)
44 60
45 set(LIBRARIES 61 set(LIBRARIES
46 ${Qt5Widgets_LIBRARIES} 62 ${Qt5Widgets_LIBRARIES}
47 ${CURL_LIBRARIES} 63 ${CURL_LIBRARIES}
64 anitomy
48 ) 65 )
49 66
50 if(APPLE) 67 if(APPLE)
51 find_library(COCOA_LIBRARY Cocoa) 68 find_library(COCOA_LIBRARY Cocoa)
52 list(APPEND LIBRARIES ${COCOA_LIBRARY}) 69 list(APPEND LIBRARIES ${COCOA_LIBRARY})
53 endif() 70 endif()
54 71
55 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE src/include src/icons) 72 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include)
56 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override) 73 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override)
57 if(APPLE) 74 if(APPLE)
58 target_compile_definitions(weeaboo PUBLIC MACOSX) 75 target_compile_definitions(weeaboo PUBLIC MACOSX)
76 elseif(WIN32)
77 target_compile_definitions(weeaboo PUBLIC WIN32)
59 endif() 78 endif()
60 target_link_libraries(weeaboo ${LIBRARIES}) 79 target_link_libraries(weeaboo ${LIBRARIES})