project(IOTCAPIs_Sample) cmake_minimum_required(VERSION 2.8) #set(ROOT_DIR "${CMAKE_SOURCE_DIR}/../../../") include_directories(${ROOT_DIR}/Include) include_directories(${CMAKE_SOURCE_DIR}) find_library(IOTCAPIs IOTCAPIs HINTS ${LIB_DIR}) find_library(RDTAPIs RDTAPIs HINTS ${LIB_DIR}) find_library(P2PTunnelAPIs P2PTunnelAPIs HINTS ${LIB_DIR}) SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}") SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}") SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}") SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}") add_executable(P2PTunnelServer P2PTunnelServer.c) target_link_libraries(P2PTunnelServer P2PTunnelAPIs RDTAPIs IOTCAPIs) add_executable(P2PTunnelAgent P2PTunnelAgent.c) target_link_libraries(P2PTunnelAgent P2PTunnelAPIs RDTAPIs IOTCAPIs) add_executable(P2PTunnelServerByNebula P2PTunnelServerByNebula.c disposable_params.c) target_link_libraries(P2PTunnelServerByNebula P2PTunnelAPIs RDTAPIs IOTCAPIs ) add_executable(P2PTunnelAgentByNebula P2PTunnelAgentByNebula.c disposable_params.c) target_link_libraries(P2PTunnelAgentByNebula P2PTunnelAPIs RDTAPIs IOTCAPIs ) add_executable(P2PTunnelServerManually P2PTunnelServerManually.c ) target_link_libraries(P2PTunnelServerManually P2PTunnelAPIs RDTAPIs IOTCAPIs ) add_executable(P2PTunnelAgentManually P2PTunnelAgentManually.c ) target_link_libraries(P2PTunnelAgentManually P2PTunnelAPIs RDTAPIs IOTCAPIs ) add_executable(P2PTunnelServerManuallyByNebula P2PTunnelServerManuallyByNebula.c disposable_params.c) target_link_libraries(P2PTunnelServerManuallyByNebula P2PTunnelAPIs RDTAPIs IOTCAPIs ) add_executable(P2PTunnelAgentManuallyByNebula P2PTunnelAgentManuallyByNebula.c disposable_params.c) target_link_libraries(P2PTunnelAgentManuallyByNebula P2PTunnelAPIs RDTAPIs IOTCAPIs )