-
Notifications
You must be signed in to change notification settings - Fork 1
/
CmakeLists.txt
36 lines (29 loc) · 959 Bytes
/
CmakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.10...3.20)
project(ipconverter VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
# find dependencies
find_package(spdlog REQUIRED)
find_package(fmt_LIBRARIES NAMES fmt fmtd)
find_library(JSONCPP_LIBRARIES NAMES jsoncpp)
find_package(Boost REQUIRED COMPONENTS system thread)
option(CMAKE_VERBOSE_MAKEFILE "Verbose Makefile" ON)
option(BUILD_TESTS "Build tests" ON)
add_compile_definitions(ENGINE_VERSION="${PROJECT_VERSION}")
add_executable("${PROJECT_NAME}"
src/main.cpp
src/ip_converter.cpp
src/ip_address_converter.cpp
)
target_link_libraries("${PROJECT_NAME}" PRIVATE
fmt::fmt
${CURL_LIBRARIES}
${Boost_LIBRARIES}
${spdlog_LIBRARIES}
/usr/local/Cellar/jsoncpp/1.9.5/lib/libjsoncpp.dylib
)
# IF (BUILD_TESTS)
# MESSAGE(STATUS "Building tests ...")
# ENABLE_TESTING()
# ADD_SUBDIRECTORY(test)
# ADD_TEST(NAME ${PROJECT_NAME}_tests COMMAND test/${PROJECT_NAME}_test)
# ENDIF (BUILD_TESTS)