Skip to content

Commit

Permalink
CMake: Fix installation PDB files with multi-config generators.
Browse files Browse the repository at this point in the history
* CMakeLists.txt
  (): Use $<TARGET_PDB_FILE> generator expression to determine path to .pdb
   file of a target.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920432 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 3, 2024
1 parent 15288d8 commit d384777
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ ENDIF()
IF (APR_BUILD_SHARED)
ADD_LIBRARY(${apr_libname} SHARED ${APR_SOURCES} ${APR_EXTRA_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc)
LIST(APPEND install_targets ${apr_libname})
LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/${apr_libname}.pdb)
LIST(APPEND install_bin_pdb $<TARGET_PDB_FILE:${apr_libname}>)
TARGET_LINK_LIBRARIES(${apr_libname}
PRIVATE ${XMLLIB_LIBRARIES} ${XLATE_LIBRARIES} ${APR_SYSTEM_LIBS} ${APR_EXTRA_LIBRARIES})
TARGET_COMPILE_DEFINITIONS(${apr_libname}
Expand Down Expand Up @@ -595,7 +595,7 @@ IF(APR_MODULAR_DSO AND APU_HAVE_CRYPTO)
ENDIF()
ADD_LIBRARY(apr_crypto_openssl-2 SHARED crypto/apr_crypto_openssl.c libapr.rc)
LIST(APPEND install_modules apr_crypto_openssl-2)
LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_crypto_openssl-2.pdb)
LIST(APPEND install_bin_pdb $<TARGET_PDB_FILE:apr_crypto_openssl-2>)
TARGET_LINK_LIBRARIES(apr_crypto_openssl-2 ${apr_libname} ${APR_SYSTEM_LIBS} ${OPENSSL_LIBRARIES})
SET_TARGET_PROPERTIES(apr_crypto_openssl-2 PROPERTIES INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}")
TARGET_COMPILE_DEFINITIONS(apr_crypto_openssl-2
Expand All @@ -605,7 +605,7 @@ ENDIF()
IF(APR_MODULAR_DSO AND APU_HAVE_ODBC)
ADD_LIBRARY(apr_dbd_odbc-2 SHARED dbd/apr_dbd_odbc.c libapr.rc)
LIST(APPEND install_modules apr_dbd_odbc-2)
LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_odbc-2.pdb)
LIST(APPEND install_bin_pdb $<TARGET_PDB_FILE:apr_dbd_odbc-2>)
LIST(APPEND dbd_drivers odbc)
TARGET_LINK_LIBRARIES(apr_dbd_odbc-2 ${apr_libname} ${APR_SYSTEM_LIBS} odbc32 odbccp32)
SET_PROPERTY(TARGET apr_dbd_odbc-2 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver)
Expand All @@ -616,7 +616,7 @@ ENDIF()
IF(APR_MODULAR_DSO AND APU_HAVE_SQLITE3)
ADD_LIBRARY(apr_dbd_sqlite3-2 SHARED dbd/apr_dbd_sqlite3.c libapr.rc)
LIST(APPEND install_modules apr_dbd_sqlite3-2)
LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_sqlite3-2.pdb)
LIST(APPEND install_bin_pdb $<TARGET_PDB_FILE:apr_dbd_sqlite3-2>)
LIST(APPEND dbd_drivers sqlite3)
TARGET_LINK_LIBRARIES(apr_dbd_sqlite3-2 ${apr_libname} ${APR_SYSTEM_LIBS} ${SQLite3_LIBRARIES})
SET_PROPERTY(TARGET apr_dbd_sqlite3-2 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_sqlite3_driver)
Expand Down

0 comments on commit d384777

Please sign in to comment.