Created
June 10, 2020 03:24
-
-
Save matjam/a3ebec6f789f148f6932edda02e9d5b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CMakeLists.txt | |
cmake_minimum_required(VERSION 3.16) | |
# install vcpkg into /usr/local/vcpkg or some other path; you just need to point to it. | |
# hardcode the path in the CMakeLists.txt because I'm a peasant. | |
set(CMAKE_TOOLCHAIN_FILE "/usr/local/vcpkg/scripts/buildsystems/vcpkg.cmake") | |
project(testapp | |
VERSION 0.1 | |
DESCRIPTION "test" | |
LANGUAGES CXX) | |
# You'll need your source and header files in src/ naturally. | |
file(GLOB_RECURSE sources CONFIGURE_DEPENDS src/*.cpp src/*.hpp) | |
# This example uses the boost::filesystem stuff. | |
find_package(Boost REQUIRED COMPONENTS filesystem) | |
add_executable(testapp ${sources}) | |
# recommended that you use modern C++. | |
set_property(TARGET testapp PROPERTY CXX_STANDARD 17) | |
# This links in Boost::filesystem but usually you don't need this step if | |
# you're using something that is header only. | |
target_link_libraries(testapp PRIVATE Boost::filesystem) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment