Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
4:5af270662505 | 5:51ae25154b70 |
---|---|
1 cmake_minimum_required(VERSION 3.5) | 1 cmake_minimum_required(VERSION 3.16) |
2 project(weeaboo) | 2 project(weeaboo LANGUAGES CXX OBJCXX) |
3 | 3 |
4 set(SRC_FILES | 4 set(SRC_FILES |
5 src/main.cpp | 5 src/main.cpp |
6 src/config.cpp | 6 src/config.cpp |
7 src/filesystem.cpp | 7 src/filesystem.cpp |
18 # src/pages/statistics.cpp | 18 # src/pages/statistics.cpp |
19 # src/pages/now_playing.cpp | 19 # src/pages/now_playing.cpp |
20 ) | 20 ) |
21 | 21 |
22 if(APPLE) | 22 if(APPLE) |
23 list(APPEND SRC_FILES src/sys/osx/dark_theme.mm) | 23 list(APPEND SRC_FILES |
24 src/sys/osx/dark_theme.mm | |
25 src/sys/osx/filesystem.mm | |
26 ) | |
24 elseif(WIN32) | 27 elseif(WIN32) |
25 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) | 28 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) |
26 endif() | 29 endif() |
27 | 30 |
28 add_executable(weeaboo WIN32 MACOSX_BUNDLE ${SRC_FILES}) | 31 add_executable(weeaboo WIN32 MACOSX_BUNDLE ${SRC_FILES}) |
30 set_property(TARGET weeaboo PROPERTY AUTOMOC ON) | 33 set_property(TARGET weeaboo PROPERTY AUTOMOC ON) |
31 set_property(TARGET weeaboo PROPERTY AUTORCC ON) | 34 set_property(TARGET weeaboo PROPERTY AUTORCC ON) |
32 | 35 |
33 find_package(Qt5 COMPONENTS Widgets REQUIRED) | 36 find_package(Qt5 COMPONENTS Widgets REQUIRED) |
34 find_package(CURL REQUIRED) | 37 find_package(CURL REQUIRED) |
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 | |
35 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE src/include src/icons) | 49 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE src/include src/icons) |
36 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override) | 50 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override) |
37 target_link_libraries(weeaboo ${Qt5Widgets_LIBRARIES} ${CURL_LIBRARIES}) | 51 if(APPLE) |
52 target_compile_definitions(weeaboo PUBLIC MACOSX) | |
53 endif() | |
54 target_link_libraries(weeaboo ${LIBRARIES}) |