2021-09-04 08:00:07 +08:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
|
|
|
project(pystring CXX)
|
2017-07-21 04:39:09 +08:00
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
2021-09-04 08:00:07 +08:00
|
|
|
add_library(pystring pystring.cpp)
|
|
|
|
target_include_directories(
|
|
|
|
pystring
|
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
)
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
2017-07-21 04:39:09 +08:00
|
|
|
|
|
|
|
install(
|
2021-09-04 08:00:07 +08:00
|
|
|
TARGETS pystring
|
|
|
|
EXPORT pystring-config
|
2017-07-21 04:39:09 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT DISABLE_INSTALL_HEADERS)
|
2021-08-10 16:11:41 +08:00
|
|
|
install(FILES pystring.h DESTINATION include/pystring)
|
2017-07-21 04:39:09 +08:00
|
|
|
endif()
|
2021-09-04 08:00:07 +08:00
|
|
|
|
|
|
|
install(
|
|
|
|
EXPORT pystring-config
|
|
|
|
NAMESPACE pystring::
|
|
|
|
DESTINATION share/pystring
|
|
|
|
)
|