| 1 |
# This CMakeLists.txt is part of the subproject B (ExternalProject_Add). |
| 2 |
|
| 3 |
cmake_minimum_required(VERSION 3.20) |
| 4 |
project(subpro_d_executable LANGUAGES CXX) |
| 5 |
|
| 6 |
find_package(static_lib_project REQUIRED) |
| 7 |
find_package(shared_lib_project REQUIRED) |
| 8 |
find_package(c2_lib_project REQUIRED) |
| 9 |
|
| 10 |
add_executable(the_executable |
| 11 |
"src/main.cpp" |
| 12 |
) |
| 13 |
|
| 14 |
target_link_libraries(the_executable PRIVATE |
| 15 |
the_static_lib |
| 16 |
the_shared_lib |
| 17 |
the_c2_lib |
| 18 |
) |
| 19 |
|
| 20 |
# This is to fix an issue on AIX/GCC (see commit 4fc47424) |
| 21 |
set_property(TARGET the_executable PROPERTY NO_SYSTEM_FROM_IMPORTED 1) |
| 22 |
|
| 23 |
install( |
| 24 |
TARGETS |
| 25 |
the_executable |
| 26 |
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" |
| 27 |
) |