aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Boucek <mohinda@gmail.com>2019-07-15 20:14:28 +0200
committerPhil Christensen <philc@microsoft.com>2019-07-15 11:14:28 -0700
commit84a0270693aae94e9a9b6454aab8ff1ca4146f0c (patch)
tree030045dee5029099f4233173cfb364628805f94d
parent8b0a8ca3db95487676080968d271f7e8482f0a98 (diff)
downloadvcpkg-84a0270693aae94e9a9b6454aab8ff1ca4146f0c.tar.gz
vcpkg-84a0270693aae94e9a9b6454aab8ff1ca4146f0c.zip
[nonius] properly install noniusConfig.cmake (#7258)
-rw-r--r--ports/nonius/CMakeLists.txt30
-rw-r--r--ports/nonius/CONTROL2
-rw-r--r--ports/nonius/portfile.cmake14
3 files changed, 44 insertions, 2 deletions
diff --git a/ports/nonius/CMakeLists.txt b/ports/nonius/CMakeLists.txt
new file mode 100644
index 000000000..38f213d16
--- /dev/null
+++ b/ports/nonius/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.9)
+cmake_policy(VERSION ${CMAKE_VERSION}) # use default policies of current cmake version
+
+project(nonius)
+
+add_library(nonius INTERFACE)
+target_include_directories(nonius INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+ DESTINATION include
+ )
+endif()
+
+install(TARGETS nonius
+ EXPORT noniusExport
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(
+ EXPORT noniusExport
+ FILE noniusConfig.cmake
+ NAMESPACE Nonius::
+ DESTINATION share/nonius
+)
diff --git a/ports/nonius/CONTROL b/ports/nonius/CONTROL
index 3c321bf4e..46c984038 100644
--- a/ports/nonius/CONTROL
+++ b/ports/nonius/CONTROL
@@ -1,4 +1,4 @@
Source: nonius
-Version: 2019-04-20
+Version: 2019-04-20-1
Description: A C++ micro-benchmarking framework
Build-Depends: boost-algorithm, boost-lexical-cast, boost-math
diff --git a/ports/nonius/portfile.cmake b/ports/nonius/portfile.cmake
index 5762797cd..ca7f7b5ae 100644
--- a/ports/nonius/portfile.cmake
+++ b/ports/nonius/portfile.cmake
@@ -10,7 +10,19 @@ vcpkg_from_github(
HEAD_REF master
)
-file(COPY ${SOURCE_PATH}/include/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
# Handle copyright
configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)