-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
49 lines (42 loc) · 1.22 KB
/
CMakeLists.txt
File metadata and controls
49 lines (42 loc) · 1.22 KB
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
# ----------------------------------------------------------------------------------------
# Main application target
# ----------------------------------------------------------------------------------------
# Add project submodules
add_subdirectory(core)
add_subdirectory(controller)
add_subdirectory(dp)
add_subdirectory(socket)
add_subdirectory(excercise)
add_subdirectory(ap)
# main application executable does NOT link to this library.
add_subdirectory(leetcode)
# Header files directory
set(APP_HEADERS
${PROJECT_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/generated # cmake generated headers
)
# Define the main application executable
add_executable(${PROJECT_NAME}
main.cpp
${CORE_SOURCES}
${SOCKET_SOURCES}
${CONTROLLER_SOURCES}
${DP_SOURCES}
${EXCERCISE_SOURCES}
)
# Add header include paths
# PRIVATE -> this target only
# PUBLIC -> this target + dependent targets
# INTERFACE -> dependent targets only
target_include_directories(${PROJECT_NAME}
PRIVATE ${APP_HEADERS}
)
# Optional: add project-specific compiler options
target_compile_options(${PROJECT_NAME}
PRIVATE -Wall -Wextra -Wpedantic
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
ex_account
ex_student_manager
)