mio/CMakeLists.txt
Wunkolo b6517e711f Add BUILD_TESTS option, installation
Remove compiler flags/warnings, makefile verbosity and colors
2018-07-27 19:14:43 -07:00

37 lines
679 B
CMake

cmake_minimum_required( VERSION 3.2.2 )
project( mio )
### Standard
set( CMAKE_CXX_STANDARD 11 )
# Generate 'compile_commands.json' for clang_complete
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
### Flags/Options
option( BUILD_TESTS "Enable the building of mio unit tests" OFF )
### Library targets
add_library( mio INTERFACE)
target_include_directories( mio INTERFACE include )
install(
DIRECTORY include/
DESTINATION include
)
### Test targets
if( BUILD_TESTS )
## test
add_executable(
test
test/test.cpp
)
target_link_libraries( test PRIVATE mio )
## example
add_executable(
example
test/example.cpp
)
target_link_libraries( example PRIVATE mio )
endif()