mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 20:24:35 +03:00
update sub project example to use include instead of inc
This commit is contained in:
@@ -9,14 +9,8 @@ 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
|
||||
)
|
||||
|
||||
# Include the inc directories from the sub projects
|
||||
include_directories( ${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${sublibrary1_SOURCE_DIR}/inc
|
||||
${sublibrary2_SOURCE_DIR}/inc
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "sublib1.h"
|
||||
#include "sublib2.h"
|
||||
#include "sublib1/sublib1.h"
|
||||
#include "sublib2/sublib2.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user