cmake.md 770 B


# Set the project name
project (gateway-server)


# CMAKE_SOURCE_DIR path to CMakeLists.txt directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/deploy/bin)


set(INCLUDE_SUBDIRECTORIES 
        ${CMAKE_SOURCE_DIR}/include
        ${CMAKE_SOURCE_DIR}/library/include
        ${CMAKE_SOURCE_DIR}/include/gateway-server
)


include_directories(${INCLUDE_SUBDIRECTORIES})

set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/library")
 
find_library(MICROHTTPD_LIB microhttpd PATHS "${CMAKE_SOURCE_DIR}/lib")




file(GLOB_RECURSE SRC_FILES src/*.cpp)


# link_directories(${CMAKE_SOURCE_DIR}/library)
# link_libraries(microhttpd)


# Add an executable
add_executable(${PROJECT_NAME} ${SRC_FILES})

 
target_link_libraries(${PROJECT_NAME} ${MICROHTTPD_LIB})