forked from boostorg/config
Merge pull request #242 from Mike-Devel/min_cmake
[CMake] Generate cmake target for boost config that other libraries can depend on
This commit is contained in:
11
CMakeLists.txt
Normal file
11
CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(BoostConfig LANGUAGES CXX)
|
||||
|
||||
add_library(boost_config INTERFACE)
|
||||
add_library(Boost::config ALIAS boost_config)
|
||||
|
||||
target_include_directories(boost_config INTERFACE include)
|
13
test/cmake/CMakeLists.txt
Normal file
13
test/cmake/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(BoostFilesystem_test)
|
||||
|
||||
add_subdirectory(../.. ${CMAKE_CURRENT_BINARY_DIR}/boost_config)
|
||||
|
||||
add_executable(boost_config_cmake_compilation_test main.cpp)
|
||||
target_link_libraries(boost_config_cmake_compilation_test Boost::config)
|
||||
|
||||
|
7
test/cmake/main.cpp
Normal file
7
test/cmake/main.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2018 Mike Dev
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE_1_0.txt or copy at http ://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
int main() {}
|
Reference in New Issue
Block a user