forked from conan-io/cmake-conan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
33 lines (23 loc) · 986 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
cmake_minimum_required(VERSION 3.9)
project(FormatOutput CXX)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
add_definitions("-std=c++11")
# 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/0.18.1/conan.cmake"
# "${CMAKE_BINARY_DIR}/conan.cmake"
# TLS_VERIFY ON)
# endif()
# include(${CMAKE_BINARY_DIR}/conan.cmake)
include(conan.cmake)
conan_cmake_configure(REQUIRES fmt/6.1.2
GENERATORS cmake_find_package)
conan_cmake_autodetect(settings)
conan_cmake_install(PATH_OR_REFERENCE .
BUILD missing
REMOTE conancenter
SETTINGS ${settings})
find_package(fmt)
add_executable(main main.cpp)
target_link_libraries(main fmt::fmt)