Files
cmake-examples/02-sub-projects/A-basic/subbinary/CMakeLists.txt

17 lines
415 B
CMake

project(subbinary)
set(SOURCES
main.cpp
)
# Create the executable
add_executable(${PROJECT_NAME} ${SOURCES})
# Link the static library from subproject1 using it's alias sub::lib1
# Link the header only library from subproject2 using it's alias sub::lib2
# This will cause the include directories for that target to be added to this project
target_link_libraries(${PROJECT_NAME}
sub::lib1
sub::lib2
)