aboutsummaryrefslogtreecommitdiff
path: root/ports/pystring/CMakeLists.txt
blob: 48df849192b0fa043f66e6c9938c8ff6b605e1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.12)
project(pystring CXX)

if(MSVC)
  add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
endif()

add_library(pystring pystring.cpp)
target_include_directories(
  pystring
  PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    $<INSTALL_INTERFACE:include>
)

include(GNUInstallDirs)

install(
  TARGETS pystring
  EXPORT pystring-config
)

if(NOT DISABLE_INSTALL_HEADERS)
  install(FILES pystring.h DESTINATION include/pystring)
endif()

install(
  EXPORT pystring-config
  NAMESPACE pystring::
  DESTINATION share/pystring
)