aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/CMakeLists.txt')
-rw-r--r--libtransport/src/CMakeLists.txt41
1 files changed, 29 insertions, 12 deletions
diff --git a/libtransport/src/CMakeLists.txt b/libtransport/src/CMakeLists.txt
index c92393775..079427fea 100644
--- a/libtransport/src/CMakeLists.txt
+++ b/libtransport/src/CMakeLists.txt
@@ -20,7 +20,7 @@ set(ASIO_STANDALONE 1)
add_subdirectory(core)
add_subdirectory(interfaces)
add_subdirectory(protocols)
-add_subdirectory(security)
+add_subdirectory(auth)
add_subdirectory(implementation)
add_subdirectory(utils)
add_subdirectory(http)
@@ -34,7 +34,16 @@ install(
COMPONENT lib${LIBTRANSPORT}-dev
)
-set (COMPILER_DEFINITIONS "-DTRANSPORT_LOG_DEF_LEVEL=TRANSPORT_LOG_${TRANSPORT_LOG_LEVEL}")
+install(
+ FILES "transport.config"
+ DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/hicn
+ COMPONENT lib${LIBTRANSPORT}
+)
+
+list(APPEND COMPILER_DEFINITIONS
+ "-DTRANSPORT_LOG_DEF_LEVEL=TRANSPORT_LOG_${TRANSPORT_LOG_LEVEL}"
+ "-DASIO_STANDALONE"
+)
list(INSERT LIBTRANSPORT_INTERNAL_INCLUDE_DIRS 0
${CMAKE_CURRENT_SOURCE_DIR}/
@@ -50,13 +59,15 @@ set(LIBTRANSPORT_INCLUDE_DIRS
if (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
else ()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4200")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4200 -D_WIN32_WINDOWS=0x0400")
if (CMAKE_BUILD_TYPE EQUAL "RELEASE")
- set(CMAKE_SHARED_LINKER_FLAGS "/NODEFAULTLIB:\"MSVCRTD\"" )
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:\"MSVCRTD\"" )
endif ()
endif ()
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "Android")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -isystem -lm")
+ add_subdirectory(io_modules)
endif()
if (DISABLE_SHARED_LIBRARIES)
@@ -67,9 +78,10 @@ if (DISABLE_SHARED_LIBRARIES)
LINK_LIBRARIES ${LIBRARIES}
DEPENDS ${DEPENDENCIES}
COMPONENT lib${LIBTRANSPORT}
- INCLUDE_DIRS ${LIBTRANSPORT_INTERNAL_INCLUDE_DIRS} ${LIBTRANSPORT_INCLUDE_DIRS}
- INSTALL_ROOT_DIR hicn/transport
+ INCLUDE_DIRS ${LIBTRANSPORT_INCLUDE_DIRS} ${LIBTRANSPORT_INTERNAL_INCLUDE_DIRS}
+ HEADER_ROOT_DIR hicn/transport
DEFINITIONS ${COMPILER_DEFINITIONS}
+ VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}
)
else ()
build_library(${LIBTRANSPORT}
@@ -79,13 +91,18 @@ else ()
LINK_LIBRARIES ${LIBRARIES}
DEPENDS ${DEPENDENCIES}
COMPONENT lib${LIBTRANSPORT}
- INCLUDE_DIRS ${LIBTRANSPORT_INTERNAL_INCLUDE_DIRS} ${LIBTRANSPORT_INCLUDE_DIRS}
- INSTALL_ROOT_DIR hicn/transport
+ INCLUDE_DIRS ${LIBTRANSPORT_INCLUDE_DIRS} ${LIBTRANSPORT_INTERNAL_INCLUDE_DIRS}
+ HEADER_ROOT_DIR hicn/transport
DEFINITIONS ${COMPILER_DEFINITIONS}
+ VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}
)
endif ()
-if (${COMPILE_TESTS})
- add_subdirectory(core/test)
- add_subdirectory(transport/test)
+# io modules
+if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
+ add_subdirectory(io_modules)
+endif()
+
+if (${BUILD_TESTS})
+ add_subdirectory(test)
endif()