Make dependencies private since they're only used by the implementation.
This commit is contained in:
parent
5a4456bf46
commit
9a37253461
@ -1,5 +1,5 @@
|
|||||||
### CMAKE
|
### CMAKE
|
||||||
project( mpw C )
|
project( mpw-cli C )
|
||||||
cmake_minimum_required( VERSION 3.0.2 )
|
cmake_minimum_required( VERSION 3.0.2 )
|
||||||
|
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ endif()
|
|||||||
### DEPENDENCIES
|
### DEPENDENCIES
|
||||||
function( use_mpw_sodium t r )
|
function( use_mpw_sodium t r )
|
||||||
if( USE_SODIUM )
|
if( USE_SODIUM )
|
||||||
target_link_libraries( "${t}" sodium )
|
target_link_libraries( "${t}" PRIVATE sodium )
|
||||||
target_compile_definitions( "${t}" PUBLIC -DMPW_SODIUM=1 )
|
target_compile_definitions( "${t}" PRIVATE -DMPW_SODIUM=1 )
|
||||||
message( STATUS "${t}: USE_SODIUM is enabled." )
|
message( STATUS "${t}: USE_SODIUM is enabled." )
|
||||||
|
|
||||||
elseif( r STREQUAL "required" )
|
elseif( r STREQUAL "required" )
|
||||||
@ -56,9 +56,9 @@ function( use_mpw_color t )
|
|||||||
find_package( Curses )
|
find_package( Curses )
|
||||||
if( USE_COLOR )
|
if( USE_COLOR )
|
||||||
if ( CURSES_FOUND )
|
if ( CURSES_FOUND )
|
||||||
target_include_directories( "${t}" PUBLIC ${CURSES_INCLUDE_DIR} )
|
target_include_directories( "${t}" PRIVATE ${CURSES_INCLUDE_DIR} )
|
||||||
target_link_libraries( "${t}" ${CURSES_LIBRARIES} )
|
target_link_libraries( "${t}" PRIVATE ${CURSES_LIBRARIES} )
|
||||||
target_compile_definitions( "${t}" PUBLIC -DMPW_COLOR=1 ${CURSES_DEFINITIONS} )
|
target_compile_definitions( "${t}" PRIVATE -DMPW_COLOR=1 ${CURSES_DEFINITIONS} )
|
||||||
message( STATUS "${t}: USE_COLOR is enabled." )
|
message( STATUS "${t}: USE_COLOR is enabled." )
|
||||||
|
|
||||||
elseif( r STREQUAL "required" )
|
elseif( r STREQUAL "required" )
|
||||||
@ -80,8 +80,8 @@ endfunction()
|
|||||||
|
|
||||||
function( use_mpw_json t )
|
function( use_mpw_json t )
|
||||||
if( USE_JSON )
|
if( USE_JSON )
|
||||||
target_link_libraries( "${t}" json-c )
|
target_link_libraries( "${t}" PRIVATE json-c )
|
||||||
target_compile_definitions( "${t}" PUBLIC -DMPW_JSON=1 )
|
target_compile_definitions( "${t}" PRIVATE -DMPW_JSON=1 )
|
||||||
message( STATUS "${t}: USE_JSON is enabled." )
|
message( STATUS "${t}: USE_JSON is enabled." )
|
||||||
|
|
||||||
elseif( r STREQUAL "required" )
|
elseif( r STREQUAL "required" )
|
||||||
@ -97,9 +97,9 @@ function( use_mpw_xml t r )
|
|||||||
find_package( LibXml2 )
|
find_package( LibXml2 )
|
||||||
if( USE_XML )
|
if( USE_XML )
|
||||||
if ( LIBXML2_FOUND )
|
if ( LIBXML2_FOUND )
|
||||||
target_include_directories( "${t}" PUBLIC ${LIBXML2_INCLUDE_DIR} )
|
target_include_directories( "${t}" PRIVATE ${LIBXML2_INCLUDE_DIR} )
|
||||||
target_link_libraries( "${t}" ${LIBXML2_LIBRARIES} )
|
target_link_libraries( "${t}" PRIVATE ${LIBXML2_LIBRARIES} )
|
||||||
target_compile_definitions( "${t}" PUBLIC -DMPW_XML=1 ${LIBXML2_DEFINITIONS} )
|
target_compile_definitions( "${t}" PRIVATE -DMPW_XML=1 ${LIBXML2_DEFINITIONS} )
|
||||||
message( STATUS "${t}: USE_XML is enabled." )
|
message( STATUS "${t}: USE_XML is enabled." )
|
||||||
|
|
||||||
elseif( r STREQUAL "required" )
|
elseif( r STREQUAL "required" )
|
||||||
|
Loading…
Reference in New Issue
Block a user