Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
cmake_minimum_required(VERSION 3.0.2)
cmake_minimum_required(VERSION 3.5)
project(mstch)

option(WITH_UNIT_TESTS "enable building unit test executable" OFF)
option(WITH_BENCHMARK "enable building benchmark executable" OFF)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
set(CMAKE_BUILD_TYPE Release)

set(mstch_VERSION 1.0.1)
Expand Down
15 changes: 9 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
find_package(Boost 1.54 REQUIRED)

set(mstch_INCLUDE_DIR
${PROJECT_SOURCE_DIR}/include CACHE STRING "mstch include directory")

include_directories(
${mstch_INCLUDE_DIR}
${Boost_INCLUDE_DIR})
# Define headers for this library. PUBLIC headers are used for compiling
# the library, and will be added to consumers' build paths.
set(BUILD_INCLUDE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
set(INSTALL_INCLUDE $<INSTALL_INTERFACE:include>)

set(SRC
state/in_section.cpp
Expand All @@ -25,6 +23,11 @@ set(SRC
add_library(mstch STATIC ${SRC})

set_property(TARGET mstch PROPERTY VERSION ${mstch_VERSION})
target_include_directories(mstch PUBLIC
${BUILD_INCLUDE}
${INSTALL_INCLUDE}
PRIVATE .)
target_link_libraries(mstch Boost::boost)

install(
TARGETS mstch EXPORT mstchTargets
Expand Down