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}")
add_subdirectory(${full_name}) if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${full_name}")
# if (NOT header_only) message(STATUS "skip ${full_name} (not found)")
# set(shared_target ${full_name}_shared) else()
# set(static_target ${full_name}_static) add_subdirectory(${full_name})
# set(lib_varname CAF_LIBRARY_${upper_name}) if(NOT ${header_only})
# set(lib_varname_static ${lib_varname}_STATIC) set(shared_target ${full_name}_shared)
# if(NOT CAF_BUILD_STATIC_ONLY) set(static_target ${full_name}_static)
# set(${lib_varname} ${shared_target}) set(lib_varname CAF_LIBRARY_${upper_name})
# set(CAF_LIBRARIES ${CAF_LIBRARIES} ${shared_target}) set(lib_varname_static ${lib_varname}_STATIC)
# else() if(NOT CAF_BUILD_STATIC_ONLY)
# set(${lib_varname} ${static_target}) set(${lib_varname} ${shared_target})
# set(CAF_LIBRARIES ${CAF_LIBRARIES} ${static_target}) set(CAF_LIBRARIES ${CAF_LIBRARIES} ${shared_target})
# endif() else()
# if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC) set(${lib_varname} ${static_target})
# set(${lib_varname_static} ${static_target}) set(CAF_LIBRARIES ${CAF_LIBRARIES} ${static_target})
# endif() endif()
# endif() if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
add_unit_tests("${full_name}/test/*.cpp") set(${lib_varname_static} ${static_target})
# add headers to include directories so other subprojects can use them endif()
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/libcaf_${name}") endif()
add_unit_tests("${full_name}/test/*.cpp")
# add headers to include directories so other subprojects can use them
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