From 4fcfc82d83de32098530abfa3aff5d6fc5532433 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 29 May 2018 05:44:34 -0500 Subject: scope private/public headers when embedding into other projects thanks to Cameron Palmer --- apps/nc/CMakeLists.txt | 8 +------- apps/ocspcheck/CMakeLists.txt | 8 +------- apps/openssl/CMakeLists.txt | 7 +------ 3 files changed, 3 insertions(+), 20 deletions(-) (limited to 'apps') diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt index 64d14fa..30c1745 100644 --- a/apps/nc/CMakeLists.txt +++ b/apps/nc/CMakeLists.txt @@ -1,12 +1,5 @@ if(BUILD_NC) -include_directories( - . - ./compat - ../../include - ../../include/compat -) - set( NC_SRC atomicio.c @@ -50,6 +43,7 @@ else() endif() add_executable(nc ${NC_SRC}) +target_include_directories(nc PRIVATE . ./compat) target_link_libraries(nc tls ${OPENSSL_LIBS}) if(ENABLE_NC) diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 15af8a8..9e0d012 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt @@ -1,12 +1,5 @@ if(NOT MSVC) -include_directories( - . - ./compat - ../../include - ../../include/compat -) - set( OCSPCHECK_SRC http.c @@ -27,6 +20,7 @@ else() endif() add_executable(ocspcheck ${OCSPCHECK_SRC}) +target_include_directories(ocspcheck PRIVATE . ./compat) target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) if(ENABLE_LIBRESSL_INSTALL) diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt index 8b800c4..1fe9004 100644 --- a/apps/openssl/CMakeLists.txt +++ b/apps/openssl/CMakeLists.txt @@ -1,9 +1,3 @@ -include_directories( - . - ../../include - ../../include/compat -) - set( OPENSSL_SRC apps.c @@ -74,6 +68,7 @@ else() endif() add_executable(openssl ${OPENSSL_SRC}) +target_include_directories(openssl PRIVATE .) target_link_libraries(openssl ${OPENSSL_LIBS}) if(ENABLE_LIBRESSL_INSTALL) -- cgit v1.2.3-55-g6feb