diff options
| author | Xing Ji <33065325+jixingcn@users.noreply.github.com> | 2021-09-04 08:00:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 17:00:07 -0700 |
| commit | 9414ca11a93e188d061986f6fe6eb84c94938ed0 (patch) | |
| tree | 0490a332c0e1f8be078ee5f49af3e130fcb6e33c /ports/pystring/CMakeLists.txt | |
| parent | aed3b48635aad5b0e13a45acfb58c232648e46dd (diff) | |
| download | vcpkg-9414ca11a93e188d061986f6fe6eb84c94938ed0.tar.gz vcpkg-9414ca11a93e188d061986f6fe6eb84c94938ed0.zip | |
[pystring] rename `libpystring` to `pystring` (#19740)
* rename `libpystring` to `pystring`
* run `vcpkg x-add-version --all`
* [pystring] Simplify CMake
* [pystring] Use target name as per opencolorio
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/pystring/CMakeLists.txt')
| -rw-r--r-- | ports/pystring/CMakeLists.txt | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt index ca410d6dc..48df84919 100644 --- a/ports/pystring/CMakeLists.txt +++ b/ports/pystring/CMakeLists.txt @@ -1,19 +1,31 @@ -cmake_minimum_required(VERSION 3.5.1) -project(libpystring C CXX) +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(libpystring pystring.cpp) +add_library(pystring pystring.cpp) +target_include_directories( + pystring + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> + $<INSTALL_INTERFACE:include> +) + +include(GNUInstallDirs) install( - TARGETS libpystring - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + 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 +) |
