Blob Blame History Raw
From 6ef3f95baf4d78f471b34334858febd95beb9c8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= <guenter.obiltschnig@appinf.com>
Date: Wed, 5 Feb 2020 06:41:10 +0100
Subject: [PATCH] fix POCO_UNBUNDLES

---
 CMakeLists.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf22d25768..96c475828e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -437,6 +437,15 @@ write_basic_package_version_file(
   COMPATIBILITY AnyNewerVersion
 )
 
+# Set config script install location in a location that find_package() will
+# look for, which is different on MS Windows than for UNIX
+# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
+if (WIN32)
+  set(PocoConfigPackageLocation "cmake")
+else()
+  set(PocoConfigPackageLocation "lib/cmake/${PROJECT_NAME}")
+endif()
+
 configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
 install(
     FILES