Skip to content

Commit 1ce0ddd

Browse files
authored
Merge pull request #81 from capitalistspz/master
No longer require manually setting include path in dependants
2 parents af4d316 + 1dd35c8 commit 1ce0ddd

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ else(CMAKE_BUILD_TYPE MATCHES Release)
5454
add_definitions(-D__BUILDTYPE__="debug")
5555
endif(CMAKE_BUILD_TYPE MATCHES Release)
5656

57-
58-
# add include directory
59-
include_directories(include)
60-
6157
# create our capture library
6258
add_library(openpnp-capture SHARED common/libmain.cpp
6359
common/context.cpp
6460
common/logging.cpp
6561
common/stream.cpp)
6662

63+
target_include_directories(openpnp-capture PUBLIC
64+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
65+
$<INSTALL_INTERFACE:include>
66+
)
6767
# define common properties
6868
set_target_properties(openpnp-capture PROPERTIES
6969
VERSION ${OPENPNP_CAPTURE_LIB_VERSION}

QtCaptureTest/QtCaptureTest.pro

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ TEMPLATE = app
1414
macx:CONFIG -= app_bundle
1515
#CONFIG += console
1616

17-
# add the openpnp-capture include path
18-
INCLUDEPATH += ../include
19-
2017
SOURCES += main.cpp\
2118
mainwindow.cpp
2219

linux/tests/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ project (openpnp-capture-test)
1515

1616
set (SOURCE main.cpp ../../common/logging.cpp)
1717

18-
# add include directory
19-
include_directories(../include ..)
20-
2118
add_executable(openpnp-capture-test ${SOURCE})
2219

2320
target_link_libraries(openpnp-capture-test openpnp-capture)

mac/tests/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
cmake_minimum_required(VERSION 3.0)
1414
project (openpnp-capture-test)
1515

16-
# add include directory
17-
include_directories(../include ..)
18-
1916
set (SOURCE main.cpp ../../common/logging.cpp)
2017

2118
add_executable(openpnp-capture-test ${SOURCE})

win/tests/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
cmake_minimum_required(VERSION 3.0)
1414
project (openpnp-capture-test)
1515

16-
# add include directory
17-
include_directories(../include ..)
18-
1916
set (SOURCE main.cpp ../../common/logging.cpp)
2017

2118
add_executable(openpnp-capture-test ${SOURCE})

0 commit comments

Comments
 (0)