annotate CMakeLists.txt @ 6:1d82f6e04d7d

Update: add first parts to the settings dialog
author Paper <mrpapersonic@gmail.com>
date Wed, 16 Aug 2023 00:49:17 -0400
parents 51ae25154b70
children 07a9095eaeed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
1 cmake_minimum_required(VERSION 3.16)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
2 project(weeaboo LANGUAGES CXX OBJCXX)
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
3
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
4 set(SRC_FILES
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
5 src/main.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 src/config.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
7 src/filesystem.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
8 src/anilist.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
9 src/anime.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10 src/json.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11 src/date.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 src/time.cpp
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
13 src/sidebar.cpp
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
14 src/progress.cpp
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
15 src/dialog/settings.cpp
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
16 src/dialog/information.cpp
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
17 src/dialog/settings/services.cpp
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
18 src/dialog/settings/application.cpp
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
19 src/ui_utils.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
20 src/string_utils.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 rc/icons.qrc
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 dep/darkstyle/darkstyle.qrc
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
23 # src/pages/statistics.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
24 # src/pages/now_playing.cpp
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
25 )
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 if(APPLE)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
28 list(APPEND SRC_FILES
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
29 src/sys/osx/dark_theme.mm
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
30 src/sys/osx/filesystem.mm
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
31 )
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
32 elseif(WIN32)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
33 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
34 endif()
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
35
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
36 add_executable(weeaboo WIN32 MACOSX_BUNDLE ${SRC_FILES})
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
37 set_property(TARGET weeaboo PROPERTY CXX_STANDARD 20)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
38 set_property(TARGET weeaboo PROPERTY AUTOMOC ON)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
39 set_property(TARGET weeaboo PROPERTY AUTORCC ON)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
40
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
41 find_package(Qt5 COMPONENTS Widgets REQUIRED)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
42 find_package(CURL REQUIRED)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
43
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
44 set(LIBRARIES
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
45 ${Qt5Widgets_LIBRARIES}
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
46 ${CURL_LIBRARIES}
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
47 )
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
48
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
49 if(APPLE)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
50 find_library(COCOA_LIBRARY Cocoa)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
51 list(APPEND LIBRARIES ${COCOA_LIBRARY})
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
52 endif()
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
53
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
54 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE src/include src/icons)
4
5af270662505 Set override functions as override
Paper <mrpapersonic@gmail.com>
parents: 3
diff changeset
55 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
56 if(APPLE)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
57 target_compile_definitions(weeaboo PUBLIC MACOSX)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
58 endif()
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
59 target_link_libraries(weeaboo ${LIBRARIES})