[ https://issues.apache.org/jira/browse/THRIFT-5810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17871604#comment-17871604 ]
Alexander Kurz commented on THRIFT-5810: ---------------------------------------- Proposal to fix this issue: {code:java} commit 1edc96b692c5d1be7af34b91114861a6a4e54e11 (HEAD -> master) Author: Alexander Kurz <alexander.k...@mvtec.com> Date: Wed Aug 7 12:52:06 2024 +0200 THRIFT-5810: fix THRIFT-5109 regarding static MSVC libraries With THRIFT-5109 the LIB_INSTALL_DIR for MSVC libs chanaged from lib/ to bin/ which makes sense for shared libs but is not consistent with the usual treatment of static libs. Install the static libs to lib/, similar to other platforms and projects.diff --git a/build/cmake/DefineInstallationPaths.cmake b/build/cmake/DefineInstallationPaths.cmake index 23962b442..0c3dd094a 100644 --- a/build/cmake/DefineInstallationPaths.cmake +++ b/build/cmake/DefineInstallationPaths.cmake @@ -20,7 +20,9 @@ # Define the default install paths set(BIN_INSTALL_DIR "bin" CACHE PATH "The binary install dir (default: bin)") -if(MSVC) +# For MSVC builds, install shared libs to bin/, while keeping the install +# dir for static libs as lib/. +if(MSVC AND BUILD_SHARED_LIBS) set(LIB_INSTALL_DIR "bin${LIB_SUFFIX}" CACHE PATH "The library install dir (default: bin${LIB_SUFFIX})") else() set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The library install dir (default: lib${LIB_SUFFIX})") {code} > Wrong installation path for static MSVC libs. > --------------------------------------------- > > Key: THRIFT-5810 > URL: https://issues.apache.org/jira/browse/THRIFT-5810 > Project: Thrift > Issue Type: Bug > Components: C++ - Library > Affects Versions: 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0 > Reporter: Alexander Kurz > Priority: Minor > > With THRIFT-5109 the LIB_INSTALL_DIR for MSVC libs chanaged from lib/ to bin/ > regardless if shared or static libraries were built. > While for shared MSVC libraries, installation to bin/ folder is correct, the > commonly used installation path of static libraries (not only for MSVC) is > the lib/ folder. The changes made in THRIFT-5109 do not distinguish between > static and shared MSVC libs. > Static MSVC libraries should be installed into the lib/ folder, as it has > been done in 0.13.0. -- This message was sent by Atlassian Jira (v8.20.10#820010)