-
Notifications
You must be signed in to change notification settings - Fork 47
/
CMakeLists.txt.patch
37 lines (35 loc) · 1.95 KB
/
CMakeLists.txt.patch
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
32
33
34
35
36
37
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddbc459..ce03503 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,13 +30,13 @@ if(UNIX OR VXWORKS)
set(FOONATHAN_MEMORY_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/foonathan_memory")
elseif(WIN32)
set(FOONATHAN_MEMORY_INC_INSTALL_DIR "include/foonathan_memory")
- set(FOONATHAN_MEMORY_RUNTIME_INSTALL_DIR "bin")
- set(FOONATHAN_MEMORY_LIBRARY_INSTALL_DIR "bin")
- set(FOONATHAN_MEMORY_ARCHIVE_INSTALL_DIR "lib")
- set(FOONATHAN_MEMORY_FRAMEWORK_INSTALL_DIR "bin")
+ set(FOONATHAN_MEMORY_RUNTIME_INSTALL_DIR "bin/INSTALLER_PLATFORM")
+ set(FOONATHAN_MEMORY_LIBRARY_INSTALL_DIR "bin/INSTALLER_PLATFORM")
+ set(FOONATHAN_MEMORY_ARCHIVE_INSTALL_DIR "lib/INSTALLER_PLATFORM")
+ set(FOONATHAN_MEMORY_FRAMEWORK_INSTALL_DIR "bin/INSTALLER_PLATFORM")
- set(FOONATHAN_MEMORY_CMAKE_CONFIG_INSTALL_DIR "share/foonathan_memory/cmake")
- set(FOONATHAN_MEMORY_ADDITIONAL_FILES_INSTALL_DIR "share/foonathan_memory")
+ set(FOONATHAN_MEMORY_CMAKE_CONFIG_INSTALL_DIR "share/foonathan_memory-INSTALLER_PLATFORM/cmake")
+ set(FOONATHAN_MEMORY_ADDITIONAL_FILES_INSTALL_DIR "share/foonathan_memory-INSTALLER_PLATFORM")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
else()
@@ -66,4 +66,11 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" "${CMAKE_CURRENT_SOURCE_DIR}
install(EXPORT foonathan_memoryTargets DESTINATION ${FOONATHAN_MEMORY_CMAKE_CONFIG_INSTALL_DIR}
FILE foonathan_memory-config.cmake)
-
+# install symbol files if any
+if(MSVC OR MSVC_IDE)
+ install(CODE
+ "file(GLOB_RECURSE PDB_FILE \"${CMAKE_CURRENT_BINARY_DIR}/*memory*.pdb\") \n if(PDB_FILE) \n file(INSTALL \${PDB_FILE}\n DESTINATION \${CMAKE_INSTALL_PREFIX}/${FOONATHAN_MEMORY_ARCHIVE_INSTALL_DIR}) \n endif()"
+ COMPONENT symbols
+ CONFIGURATIONS Debug
+ )
+endif()