Commit 8325b104 authored by Dominik Charousset's avatar Dominik Charousset

Add libcaf_net to root CMake

parent 79626224
...@@ -332,30 +332,35 @@ include_directories("${CAF_INCLUDE_DIRS}") ...@@ -332,30 +332,35 @@ include_directories("${CAF_INCLUDE_DIRS}")
macro(add_caf_lib name header_only) macro(add_caf_lib name header_only)
string(TOUPPER ${name} upper_name) string(TOUPPER ${name} upper_name)
set(full_name libcaf_${name}) set(full_name "libcaf_${name}")
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${full_name}")
message(STATUS "skip ${full_name} (not found)")
else()
add_subdirectory(${full_name}) add_subdirectory(${full_name})
# if (NOT header_only) if(NOT ${header_only})
# set(shared_target ${full_name}_shared) set(shared_target ${full_name}_shared)
# set(static_target ${full_name}_static) set(static_target ${full_name}_static)
# set(lib_varname CAF_LIBRARY_${upper_name}) set(lib_varname CAF_LIBRARY_${upper_name})
# set(lib_varname_static ${lib_varname}_STATIC) set(lib_varname_static ${lib_varname}_STATIC)
# if(NOT CAF_BUILD_STATIC_ONLY) if(NOT CAF_BUILD_STATIC_ONLY)
# set(${lib_varname} ${shared_target}) set(${lib_varname} ${shared_target})
# set(CAF_LIBRARIES ${CAF_LIBRARIES} ${shared_target}) set(CAF_LIBRARIES ${CAF_LIBRARIES} ${shared_target})
# else() else()
# set(${lib_varname} ${static_target}) set(${lib_varname} ${static_target})
# set(CAF_LIBRARIES ${CAF_LIBRARIES} ${static_target}) set(CAF_LIBRARIES ${CAF_LIBRARIES} ${static_target})
# endif() endif()
# if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC) if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
# set(${lib_varname_static} ${static_target}) set(${lib_varname_static} ${static_target})
# endif() endif()
# endif() endif()
add_unit_tests("${full_name}/test/*.cpp") add_unit_tests("${full_name}/test/*.cpp")
# add headers to include directories so other subprojects can use them # add headers to include directories so other subprojects can use them
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/libcaf_${name}") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/libcaf_${name}")
endif()
endmacro() endmacro()
add_caf_lib(bb yes) add_caf_lib(bb yes)
add_caf_lib(net no)
# -- unit tests setup ---------------------------------------------------------- # -- unit tests setup ----------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment