summaryrefslogtreecommitdiffstats
path: root/apps/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'apps/CMakeLists.txt')
-rw-r--r--apps/CMakeLists.txt33
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