-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (29 loc) · 1.41 KB
/
CMakeLists.txt
File metadata and controls
40 lines (29 loc) · 1.41 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
cmake_minimum_required(VERSION 3.20)
project(solid_principles)
set(CMAKE_CXX_STANDARD 20)
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
else ()
message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first")
endif ()
include_directories(
include
)
add_library(order include/order.h src/order.cpp)
add_library(new_order include/new_order.h src/new_order.cpp)
add_library(payment_processor include/payment_processor.h src/payment_processor.cpp)
add_executable(main_plain examples/main_plain.cpp)
target_link_libraries(main_plain order ${CONAN_LIBS})
add_executable(main_single_responsibility examples/main_single_responsibility.cpp)
target_link_libraries(main_single_responsibility new_order payment_processor ${CONAN_LIBS})
add_executable(main_open_closed examples/main_open_closed.cpp)
target_link_libraries(main_open_closed new_order ${CONAN_LIBS})
add_executable(main_liskov examples/main_liskov.cpp)
target_link_libraries(main_liskov new_order ${CONAN_LIBS})
add_executable(main_is_inh examples/main_is_inh.cpp)
target_link_libraries(main_is_inh new_order ${CONAN_LIBS})
add_executable(main_is_comp examples/main_is_comp.cpp)
target_link_libraries(main_is_comp new_order ${CONAN_LIBS})
add_executable(main_di_comp examples/main_di_comp.cpp)
target_link_libraries(main_di_comp new_order ${CONAN_LIBS})