update sub project example to use include instead of inc

This commit is contained in:
Thom Troy
2017-07-02 21:37:01 +01:00
parent 420969b4d9
commit 6c3842465f
8 changed files with 30 additions and 20 deletions

View File

@@ -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
)

View File

@@ -1,5 +1,5 @@
#include "sublib1.h"
#include "sublib2.h"
#include "sublib1/sublib1.h"
#include "sublib2/sublib2.h"
int main(int argc, char *argv[])
{