Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
cmake_minimum_required (VERSION 3.10) | ||
cmake_minimum_required(VERSION 3.10) | ||
project(platform) | ||
|
||
file(GLOB platform_headers ./src/platform/*.hpp) | ||
|
||
# Define library | ||
add_library(platform INTERFACE) | ||
target_compile_features(platform INTERFACE cxx_std_14) | ||
target_include_directories(platform INTERFACE src/) | ||
add_library(steinwurf::platform ALIAS platform) | ||
|
||
target_include_directories(platform INTERFACE src/) | ||
# Install headers | ||
install( | ||
DIRECTORY ./src/platform | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include | ||
FILES_MATCHING | ||
PATTERN *.hpp) | ||
|
||
install(FILES ${platform_headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/platform) | ||
# Is top level project? | ||
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) | ||
# Build executables | ||
add_executable(print_platform examples/print_platform/main.cpp) | ||
target_link_libraries(print_platform platform) | ||
endif() |
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