Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save snikulov/b4e4640ed716d4404799d6290e76a2ff to your computer and use it in GitHub Desktop.
Save snikulov/b4e4640ed716d4404799d6290e76a2ff to your computer and use it in GitHub Desktop.
Typical CMakeLists.txt file for conan package manager with CMake generator
cmake_minimum_required(VERSION 3.10)
project(ProjectUsingConan)
#
# Don't forget to use libstdc++11 in profile by issuing
# $ conan profile update settings.compiler.libcxx=libstdc++11 default
#
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
# Add your files here...
set(SRC_FILES
file1.cpp
file2.cpp
)
add_executable(${PROJECT_NAME} ${SRC_FILES})
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment