-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from steve-downey/install_sets
Install sets
- Loading branch information
Showing
8 changed files
with
79 additions
and
70 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# include/beman/optional26/CMakeLists.txt -*-cmake-*- | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
target_sources( | ||
beman_optional26 | ||
PUBLIC | ||
FILE_SET beman_optional26_headers | ||
TYPE HEADERS | ||
FILES | ||
optional.hpp | ||
detail/iterator.hpp | ||
detail/stl_interfaces/config.hpp | ||
detail/stl_interfaces/fwd.hpp | ||
detail/stl_interfaces/iterator_interface.hpp | ||
) |
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,40 +1,26 @@ | ||
# cmake-format: off | ||
# src/beman/optional26/CMakeLists.txt -*-makefile-*- | ||
# src/beman/optional26/CMakeLists.txt -*-cmake-*- | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# cmake-format: on | ||
|
||
add_library(beman_optional26 STATIC optional.cpp detail/iterator.cpp) | ||
|
||
include(GNUInstallDirs) | ||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
target_include_directories( | ||
beman_optional26 | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../src/> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_LOWER_PROJECT_NAME}> | ||
) | ||
# Ensure that optional and iterator get compiled at least once | ||
target_sources(beman_optional26 PUBLIC optional.cpp detail/iterator.cpp) | ||
|
||
# The library is empty -- exclude it | ||
install( | ||
TARGETS beman_optional26 | ||
EXPORT ${TARGETS_EXPORT_NAME} | ||
DESTINATION | ||
${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT beman_optional26_library | ||
EXCLUDE_FROM_ALL | ||
) | ||
|
||
string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_LOWER_PROJECT_NAME) | ||
|
||
install( | ||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_LOWER_PROJECT_NAME} | ||
FILES_MATCHING | ||
PATTERN "*.hpp" | ||
TARGETS beman_optional26 | ||
FILE_SET beman_optional26_headers | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
COMPONENT beman_optional26_development | ||
) | ||
|
||
target_link_libraries(beman_optional26) | ||
|
||
# Tests | ||
if(BUILD_TESTING) | ||
if(OPTIONAL26_ENABLE_TESTING) | ||
add_subdirectory(tests) | ||
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
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