You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
638 B
32 lines
638 B
2 years ago
|
cmake_minimum_required(VERSION 3.23.0)
|
||
|
|
||
|
project(SimpleTpl
|
||
|
DESCRIPTION
|
||
|
"Simple TPL with a header file and a library"
|
||
|
LANGUAGES C CXX
|
||
|
)
|
||
|
|
||
|
add_library(simpletpl SimpleTpl.hpp SimpleTpl.cpp)
|
||
|
target_include_directories(simpletpl
|
||
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||
|
)
|
||
|
|
||
|
include(GNUInstallDirs)
|
||
|
|
||
|
install(
|
||
|
TARGETS simpletpl
|
||
|
EXPORT SimpleTpl
|
||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||
|
)
|
||
|
|
||
|
install(
|
||
|
FILES SimpleTpl.hpp
|
||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||
|
)
|
||
|
|
||
|
install(EXPORT SimpleTpl
|
||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SimpleTpl
|
||
|
NAMESPACE SimpleTpl::
|
||
|
FILE SimplTplConfig.cmake
|
||
|
)
|