forked from hsf-training/cpluspluscourse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
24 lines (19 loc) · 980 Bytes
/
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
# Set up the project.
cmake_minimum_required( VERSION 3.12 )
project( virtual_inheritance LANGUAGES CXX )
# Set up the compilation environment.
include( "${CMAKE_CURRENT_SOURCE_DIR}/../common.cmake" )
# Create the user's library.
add_library( textbox "TextBox.hpp" "TextBox.cpp" )
target_include_directories( textbox PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" )
# Create the user's executable.
add_executable( trymultiherit "trymultiherit.cpp" )
target_link_libraries( trymultiherit PRIVATE textbox )
# Create the solution's library.
add_library( textboxsol EXCLUDE_FROM_ALL "solution/TextBox.hpp" "solution/TextBox.cpp" )
target_include_directories( textboxsol PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/solution" )
add_dependencies( solution textboxsol )
# Create the "solution executable".
add_executable( trymultiherit.sol EXCLUDE_FROM_ALL "solution/trymultiherit.sol.cpp" )
target_link_libraries( trymultiherit.sol PRIVATE textboxsol )
add_dependencies( solution trymultiherit.sol )