Skip to content

Commit

Permalink
[11489] update package scripts for VS2019 (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
  • Loading branch information
MiguelBarro authored May 13, 2021
1 parent ac8e182 commit cf611b5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
15 changes: 14 additions & 1 deletion CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c43485d..ee60bd9 100644
index c43485d..70a7b5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,13 +35,13 @@ if(UNIX)
Expand All @@ -22,3 +22,16 @@ index c43485d..ee60bd9 100644
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
else()
message(FATAL_ERROR "Could not set install folders for this platform!")
@@ -69,4 +69,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()
10 changes: 9 additions & 1 deletion foonathan_memory-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ if(MSVC_VERSION EQUAL 1900)
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2015/cmake/foonathan_memory-config.cmake")
endif()
elseif(MSVC_VERSION GREATER 1900)
elseif(MSVC_VERSION LESS 1920)
if(CMAKE_CL_64)
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2017/cmake/foonathan_memory-config.cmake")
else()
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2017/cmake/foonathan_memory-config.cmake")
endif()
elseif(MSVC_VERSION GREATER_EQUAL 1920)
if(CMAKE_CL_64)
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2019/cmake/foonathan_memory-config.cmake")
else()
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2019/cmake/foonathan_memory-config.cmake")
endif()
else()
message(FATAL_ERROR "Not supported version of Visual Studio")
endif()

0 comments on commit cf611b5

Please sign in to comment.