From 9a37253461df8252cd27671785f91e7e8b9bd265 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sat, 16 Jun 2018 19:47:53 -0400 Subject: [PATCH] Make dependencies private since they're only used by the implementation. --- platform-independent/c/cli/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/platform-independent/c/cli/CMakeLists.txt b/platform-independent/c/cli/CMakeLists.txt index 6eb0e5bb..5bc4482a 100644 --- a/platform-independent/c/cli/CMakeLists.txt +++ b/platform-independent/c/cli/CMakeLists.txt @@ -1,5 +1,5 @@ ### CMAKE -project( mpw C ) +project( mpw-cli C ) cmake_minimum_required( VERSION 3.0.2 ) @@ -39,8 +39,8 @@ endif() ### DEPENDENCIES function( use_mpw_sodium t r ) if( USE_SODIUM ) - target_link_libraries( "${t}" sodium ) - target_compile_definitions( "${t}" PUBLIC -DMPW_SODIUM=1 ) + target_link_libraries( "${t}" PRIVATE sodium ) + target_compile_definitions( "${t}" PRIVATE -DMPW_SODIUM=1 ) message( STATUS "${t}: USE_SODIUM is enabled." ) elseif( r STREQUAL "required" ) @@ -56,9 +56,9 @@ function( use_mpw_color t ) find_package( Curses ) if( USE_COLOR ) if ( CURSES_FOUND ) - target_include_directories( "${t}" PUBLIC ${CURSES_INCLUDE_DIR} ) - target_link_libraries( "${t}" ${CURSES_LIBRARIES} ) - target_compile_definitions( "${t}" PUBLIC -DMPW_COLOR=1 ${CURSES_DEFINITIONS} ) + target_include_directories( "${t}" PRIVATE ${CURSES_INCLUDE_DIR} ) + target_link_libraries( "${t}" PRIVATE ${CURSES_LIBRARIES} ) + target_compile_definitions( "${t}" PRIVATE -DMPW_COLOR=1 ${CURSES_DEFINITIONS} ) message( STATUS "${t}: USE_COLOR is enabled." ) elseif( r STREQUAL "required" ) @@ -80,8 +80,8 @@ endfunction() function( use_mpw_json t ) if( USE_JSON ) - target_link_libraries( "${t}" json-c ) - target_compile_definitions( "${t}" PUBLIC -DMPW_JSON=1 ) + target_link_libraries( "${t}" PRIVATE json-c ) + target_compile_definitions( "${t}" PRIVATE -DMPW_JSON=1 ) message( STATUS "${t}: USE_JSON is enabled." ) elseif( r STREQUAL "required" ) @@ -97,9 +97,9 @@ function( use_mpw_xml t r ) find_package( LibXml2 ) if( USE_XML ) if ( LIBXML2_FOUND ) - target_include_directories( "${t}" PUBLIC ${LIBXML2_INCLUDE_DIR} ) - target_link_libraries( "${t}" ${LIBXML2_LIBRARIES} ) - target_compile_definitions( "${t}" PUBLIC -DMPW_XML=1 ${LIBXML2_DEFINITIONS} ) + target_include_directories( "${t}" PRIVATE ${LIBXML2_INCLUDE_DIR} ) + target_link_libraries( "${t}" PRIVATE ${LIBXML2_LIBRARIES} ) + target_compile_definitions( "${t}" PRIVATE -DMPW_XML=1 ${LIBXML2_DEFINITIONS} ) message( STATUS "${t}: USE_XML is enabled." ) elseif( r STREQUAL "required" )