@@ -1,112 +0,0 @@
1−From 078cc28a3ece0dcc4033961090a6e5d6e63b3ec5 Mon Sep 17 00:00:00 2001
2−From: Scriptkiddi <fritz@otlinghaus.it>
3−Date: Sat, 4 Jan 2020 17:59:32 +0100
4−Subject: [PATCH] Fix the install target dirs to use the CMAKE flags
5−
6−---
7− CMakeLists.txt | 27 ++++++++++++++-------------
8− 1 file changed, 14 insertions(+), 13 deletions(-)
9−
10−diff --git a/CMakeLists.txt b/CMakeLists.txt
11−index 96b9d1b5..ff8191ae 100644
12−--- a/CMakeLists.txt
13−+++ b/CMakeLists.txt
14−@@ -5,7 +5,7 @@ project(preCICE VERSION 1.6.1 LANGUAGES CXX)
15−
16− #
17− # Overview of this configuration
18−-#
19−+#
20− # PREAMBLE
21− # Setup Options
22− # Find Mandatory Dependencies
23−@@ -30,6 +30,7 @@ include(CheckCXX11Library)
24− include(CopyTargetProperty)
25− include(XSDKMacros)
26− include(Validation)
27−+include(GNUInstallDirs)
28−
29− # CMake Policies
30−
31−@@ -197,7 +198,7 @@ if(CMAKE_VERSION VERSION_LESS "3.11")
32− endif()
33− endif()
34−
35−-# Add precice as an empty target
36−+# Add precice as an empty target
37− add_library(precice ${preCICE_DUMMY})
38− set_target_properties(precice PROPERTIES
39− # precice is a C++11 project
40−@@ -267,7 +268,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/DetectGitRevision.cmake)
41− configure_file("${PROJECT_SOURCE_DIR}/src/precice/impl/versions.hpp.in" "${PROJECT_BINARY_DIR}/src/precice/impl/versions.hpp" @ONLY)
42−
43− # Includes Configuration
44−-target_include_directories(precice PUBLIC
45−+target_include_directories(precice PUBLIC
46− $<BUILD_INTERFACE:${preCICE_SOURCE_DIR}/src>
47− $<BUILD_INTERFACE:${preCICE_BINARY_DIR}/src>
48− $<INSTALL_INTERFACE:include>
49−@@ -282,7 +283,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/sources.cmake)
50− #
51−
52− add_executable(binprecice "src/drivers/main.cpp")
53−-target_link_libraries(binprecice
54−+target_link_libraries(binprecice
55− PRIVATE
56− Threads::Threads
57− precice
58−@@ -365,18 +366,18 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/tests.cmake)
59− # binprecice - the precice binary
60− install(TARGETS precice binprecice
61− EXPORT preciceTargets
62−- LIBRARY DESTINATION lib
63−- ARCHIVE DESTINATION lib
64−- RUNTIME DESTINATION bin
65−- PUBLIC_HEADER DESTINATION include/precice
66−- INCLUDES DESTINATION include/precice
67−+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
68−+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static
69−+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
70−+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
71−+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
72− )
73−
74− if(PRECICE_InstallTest)
75− # Install the testprecice target
76− install(TARGETS testprecice
77− EXPORT preciceTargets
78−- RUNTIME DESTINATION bin
79−+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
80− )
81−
82− # Install the resources necessary for the tests
83−@@ -396,7 +397,7 @@ endif()
84− install(EXPORT preciceTargets
85− FILE preciceTargets.cmake
86− NAMESPACE precice::
87−- DESTINATION lib/cmake/precice
88−+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
89− )
90−
91− # Generate a Package Config File for precice
92−@@ -408,7 +409,7 @@ write_basic_package_version_file("preciceConfigVersion.cmake"
93−
94− # Install the Config and the ConfigVersion files
95− install(FILES "cmake/preciceConfig.cmake" "${preCICE_BINARY_DIR}/preciceConfigVersion.cmake"
96−- DESTINATION lib/cmake/precice
97−+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
98− )
99−
100− # Setup the config in the build directory
101−@@ -477,7 +478,7 @@ configure_file(
102− "lib/pkgconfig/libprecice.pc"
103− @ONLY
104− )
105−-install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
106−+install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
107− DESTINATION lib
108− )
109−
110−--
111−2.23.1
112−