Mercurial > minori
annotate CMakeLists.txt @ 5:51ae25154b70
Fix OS X support code
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Sat, 12 Aug 2023 13:10:34 -0400 |
| parents | 5af270662505 |
| children | 1d82f6e04d7d |
| rev | line source |
|---|---|
| 5 | 1 cmake_minimum_required(VERSION 3.16) |
| 2 project(weeaboo LANGUAGES CXX OBJCXX) | |
| 2 | 3 |
| 4 set(SRC_FILES | |
| 5 src/main.cpp | |
| 6 src/config.cpp | |
| 7 src/filesystem.cpp | |
| 8 src/anilist.cpp | |
| 9 src/anime.cpp | |
| 10 src/json.cpp | |
| 11 src/date.cpp | |
| 12 src/time.cpp | |
| 13 src/dialog/information.cpp | |
| 14 src/ui_utils.cpp | |
| 15 src/string_utils.cpp | |
| 16 rc/icons.qrc | |
| 17 dep/darkstyle/darkstyle.qrc | |
| 18 # src/pages/statistics.cpp | |
| 19 # src/pages/now_playing.cpp | |
| 20 ) | |
| 21 | |
| 22 if(APPLE) | |
| 5 | 23 list(APPEND SRC_FILES |
| 24 src/sys/osx/dark_theme.mm | |
| 25 src/sys/osx/filesystem.mm | |
| 26 ) | |
| 2 | 27 elseif(WIN32) |
| 28 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) | |
| 29 endif() | |
| 30 | |
| 31 add_executable(weeaboo WIN32 MACOSX_BUNDLE ${SRC_FILES}) | |
| 32 set_property(TARGET weeaboo PROPERTY CXX_STANDARD 20) | |
| 33 set_property(TARGET weeaboo PROPERTY AUTOMOC ON) | |
| 34 set_property(TARGET weeaboo PROPERTY AUTORCC ON) | |
| 35 | |
| 36 find_package(Qt5 COMPONENTS Widgets REQUIRED) | |
| 37 find_package(CURL REQUIRED) | |
| 5 | 38 |
| 39 set(LIBRARIES | |
| 40 ${Qt5Widgets_LIBRARIES} | |
| 41 ${CURL_LIBRARIES} | |
| 42 ) | |
| 43 | |
| 44 if(APPLE) | |
| 45 find_library(COCOA_LIBRARY Cocoa) | |
| 46 list(APPEND LIBRARIES ${COCOA_LIBRARY}) | |
| 47 endif() | |
| 48 | |
| 2 | 49 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
|
50 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override) |
| 5 | 51 if(APPLE) |
| 52 target_compile_definitions(weeaboo PUBLIC MACOSX) | |
| 53 endif() | |
| 54 target_link_libraries(weeaboo ${LIBRARIES}) |
