File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ endfunction()
2828# @param HEADERS
2929# @param SOURCES
3030# @param DEPENDS
31+ # @param PRIVATE_DEPENDS
3132# @parms TESTS_SOURCES
3233# @param [LIB_BUILD_INTERFACE="${PROJECT_SOURCE_DIR}/src"] The list of include paths for building
3334# the library and for external projects that link against it via the add_subdirectory() function.
@@ -41,6 +42,7 @@ function(cpp_library)
4142 HEADERS
4243 SOURCES
4344 DEPENDS
45+ PRIVATE_DEPENDS
4446 TESTS_SOURCES
4547 LIB_BUILD_INTERFACE
4648 )
@@ -67,7 +69,8 @@ function(cpp_library)
6769 )
6870 target_compile_features (${arg_cpp_lib_NAME} INTERFACE cxx_std_20)
6971 else ()
70- add_library (${arg_cpp_lib_NAME} "" ) # Library type determined by BUILD_SHARED_LIBS
72+ # Empty string makes library type determined by `BUILD_SHARED_LIBS` option
73+ add_library (${arg_cpp_lib_NAME} "" )
7174 target_sources (
7275 ${arg_cpp_lib_NAME}
7376 PRIVATE
@@ -82,7 +85,13 @@ function(cpp_library)
8285 target_compile_features (${arg_cpp_lib_NAME} PUBLIC cxx_std_20)
8386 endif ()
8487
85- target_link_libraries (${arg_cpp_lib_NAME} PUBLIC ${arg_cpp_lib_DEPENDS} )
88+ target_link_libraries (
89+ ${arg_cpp_lib_NAME}
90+ PUBLIC
91+ ${arg_cpp_lib_DEPENDS}
92+ PRIVATE
93+ ${arg_cpp_lib_PRIVATE_DEPENDS}
94+ )
8695 add_library (${arg_cpp_lib_NAMESPACE} ::${arg_cpp_lib_NAME} ALIAS ${arg_cpp_lib_NAME} )
8796
8897 if (YSTDLIB_CPP_ENABLE_TESTS)
You can’t perform that action at this time.
0 commit comments