diff options
author | 2019-03-15 14:16:15 +0100 | |
---|---|---|
committer | 2019-03-15 17:38:46 +0100 | |
commit | a1e949253043fe1a644f71cef0572ede30b752be (patch) | |
tree | 6cbe2288a82942014edb074d9b194771446b29b7 /apps/CMakeLists.txt | |
parent | e1033d6fac2ad70891a96695284b2c1e7013c91c (diff) |
[HICN-114] Update Hicn Http Server to hicn fdio stack
Change-Id: Ic808c93c14f905fd403e60be82ce319757e84c9f
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'apps/CMakeLists.txt')
-rw-r--r-- | apps/CMakeLists.txt | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 0f7a5c289..77ba64152 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -25,34 +25,37 @@ set(CMAKE_MODULE_PATH include(BuildMacros) include(WindowsMacros) +find_package(Asio REQUIRED) +find_package(CURL REQUIRED) + if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) find_package(Libtransport REQUIRED) + include_directories(${LIBTRANSPORT_INCLUDE_DIRS}) set(HICN_APPS hicn-apps) else() set(LIBTRANSPORT_LIBRARIES ${LIBTRANSPORT_SHARED}) + list(APPEND DEPENDENCIES + ${LIBHICN} + ${LIBHICN_SHARED} + ${LIBTRANSPORT_LIBRARIES} + ) endif() +list(APPEND LIBRARIES + ${LIBTRANSPORT_LIBRARIES} + ${CURL_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} +) + include(Packaging) set (COMPILER_DEFINITIONS "") -list(APPEND APPS_SRC - src/higet.cc -) if (WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4200 /wd4996") +else () + add_subdirectory(src/http-server) endif () -foreach(app ${APPS_SRC}) - get_filename_component(_app_name ${app} NAME) - string(REGEX REPLACE ".cc" "" app_name ${_app_name}) - - build_executable(${app_name} - SOURCES ${app} - LINK_LIBRARIES ${LIBTRANSPORT_LIBRARIES} ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY} - DEPENDS ${LIBTRANSPORT} - COMPONENT ${HICN_APPS} - DEFINITIONS ${COMPILER_DEFINITIONS} - ) -endforeach() +add_subdirectory(src/higet)
\ No newline at end of file |