From 14dab26de61910df21cec52c663da6be394b16d1 Mon Sep 17 00:00:00 2001 From: NextTurn <45985406+NextTurn@users.noreply.github.com> Date: Fri, 20 Mar 2020 00:00:00 +0800 Subject: [PATCH 1/2] Add clrcompression static library --- .../Native/Windows/clrcompression/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libraries/Native/Windows/clrcompression/CMakeLists.txt b/src/libraries/Native/Windows/clrcompression/CMakeLists.txt index 69576c32701180..c241f109b2a896 100644 --- a/src/libraries/Native/Windows/clrcompression/CMakeLists.txt +++ b/src/libraries/Native/Windows/clrcompression/CMakeLists.txt @@ -79,13 +79,25 @@ add_library(clrcompression ${CMAKE_REPO_ROOT}/artifacts/obj/NativeVersion.rc ) +add_library(clrcompression-static + STATIC + ${NATIVECOMPRESSION_SOURCES} + # This will add versioning to the library + ${CMAKE_REPO_ROOT}/artifacts/obj/NativeVersion.rc +) + +SET_TARGET_PROPERTIES(clrcompression-static PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(clrcompression-static PROPERTIES OUTPUT_NAME libclrcompression) + # Allow specification of arguments that should be passed to the linker SET_TARGET_PROPERTIES(clrcompression PROPERTIES LINK_FLAGS ${__LinkArgs}) +SET_TARGET_PROPERTIES(clrcompression-static PROPERTIES LINK_FLAGS ${__LinkArgs}) # Allow specification of libraries that should be linked against # CMake doesn't like space delimiters as input to target_link_libraries separate_arguments(linker_libs_sanitized WINDOWS_COMMAND ${__LinkLibraries}) target_link_libraries(clrcompression ${linker_libs_sanitized}) +target_link_libraries(clrcompression-static ${linker_libs_sanitized}) GENERATE_EXPORT_HEADER( clrcompression BASE_NAME clrcompression @@ -95,5 +107,6 @@ GENERATE_EXPORT_HEADER( clrcompression ) install (TARGETS clrcompression DESTINATION .) +install (TARGETS clrcompression-static DESTINATION .) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/clrcompression.pdb DESTINATION .) From b29007a8ee13c9590aff8ec48b4b6ff01f7a1e05 Mon Sep 17 00:00:00 2001 From: NextTurn <45985406+NextTurn@users.noreply.github.com> Date: Sun, 22 Mar 2020 00:00:00 +0800 Subject: [PATCH 2/2] Remove versioning --- src/libraries/Native/Windows/clrcompression/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libraries/Native/Windows/clrcompression/CMakeLists.txt b/src/libraries/Native/Windows/clrcompression/CMakeLists.txt index c241f109b2a896..d631f8d7ea6000 100644 --- a/src/libraries/Native/Windows/clrcompression/CMakeLists.txt +++ b/src/libraries/Native/Windows/clrcompression/CMakeLists.txt @@ -82,8 +82,6 @@ add_library(clrcompression add_library(clrcompression-static STATIC ${NATIVECOMPRESSION_SOURCES} - # This will add versioning to the library - ${CMAKE_REPO_ROOT}/artifacts/obj/NativeVersion.rc ) SET_TARGET_PROPERTIES(clrcompression-static PROPERTIES PREFIX "")