-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
69 lines (58 loc) · 2.08 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.21)
# Configures your project.
project(ClipBook LANGUAGES CXX)
# Imports the Molybden app configuration and setups the auxiliary targets, resources, etc.
# Important: Do not move this include above the project declaration.
include(node_modules/@molybden-apps/molybden/Molybden.cmake)
# The official build flag is used to enable/disable certain features.
set(OFFICIAL_BUILD TRUE)
# The source files of your app.
set(APP_SOURCES
src-cpp/src/main.cc
src-cpp/src/main_app.h
src-cpp/src/main_app.cc
src-cpp/src/url.h
src-cpp/src/url.cc
src-cpp/src/utils.h
src-cpp/src/utils.cc
src-cpp/src/url_request_interceptor.h
src-cpp/src/url_request_interceptor.cc
src-cpp/src/app_settings.h
src-cpp/src/app_settings.cc
)
if (OS_WIN)
set(APP_SOURCES_WIN
src-cpp/src/main_app_win.h
src-cpp/src/main_app_win.cc
)
endif ()
if (OS_MAC)
set(APP_SOURCES_MAC
src-cpp/src/main_app_mac.h
src-cpp/src/main_app_mac.mm
src-cpp/src/app_settings_mac.h
src-cpp/src/app_settings_mac.mm
src-cpp/src/clipboard_reader_mac.h
src-cpp/src/clipboard_reader_mac.mm
)
if (OFFICIAL_BUILD)
set(LICENSING_SOURCES_MAC
src-cpp/src/licensing/licensing.h
src-cpp/src/licensing/licensing.mm
)
endif ()
endif ()
# Add additional compile definitions.
if (OFFICIAL_BUILD)
add_compile_definitions(OFFICIAL_BUILD)
endif ()
# Defines the main target of the application.
add_library(molybden_lib STATIC ${APP_SOURCES} ${APP_SOURCES_WIN} ${APP_SOURCES_MAC} ${LICENSING_SOURCES_MAC})
# The Molybden API requires C++20.
set_property(TARGET molybden_lib PROPERTY CXX_STANDARD 20)
# Adds the Molybden API to the include path.
# Provide the additional include directories if needed.
target_include_directories(molybden_lib PRIVATE ${MOLYBDEN_SDK_DIR}/include)
if (OS_MAC)
target_link_libraries(molybden_lib PRIVATE "-framework Cocoa -framework Vision -framework IOKit")
endif ()