-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
37 lines (21 loc) · 929 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)
project(cli-table-cpp)
set(CMAKE_CXX_STANDARD 17)
set(FILES src/main.cpp src/Table.hpp src/Utils.hpp src/Utils.cpp src/Table.cpp)
#------------------------------
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.14/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP CMAKE_TARGETS
BUILD missing
)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(tests)
add_executable(cli-table-cpp ${FILES})
target_link_libraries(cli-table-cpp ${CONAN_LIBS})