diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b9aa21aef..75d987aa1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -531,7 +531,7 @@ ENDIF() IF (BUILD_SHARED_LIBS) 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_LINK_LIBRARIES(${apr_libname} PRIVATE ${XMLLIB_LIBRARIES} ${XLATE_LIBRARIES} ${APR_SYSTEM_LIBS} ${APR_EXTRA_LIBRARIES}) TARGET_COMPILE_DEFINITIONS(${apr_libname} @@ -579,8 +579,8 @@ IF(APR_MODULAR_DSO AND APU_HAVE_CRYPTO) MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") ENDIF() ADD_LIBRARY(apr_crypto_openssl-2 SHARED crypto/apr_crypto_openssl.c libapr.rc) - LIST(APPEND install_modules ${PROJECT_BINARY_DIR}/apr_crypto_openssl-2.dll) - LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_crypto_openssl-2.pdb) + LIST(APPEND install_modules apr_crypto_openssl-2) + LIST(APPEND install_bin_pdb $) 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 @@ -589,8 +589,8 @@ 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 ${PROJECT_BINARY_DIR}/apr_dbd_odbc-2.dll) - LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_odbc-2.pdb) + LIST(APPEND install_modules apr_dbd_odbc-2) + LIST(APPEND install_bin_pdb $) 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) @@ -600,8 +600,8 @@ 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 ${PROJECT_BINARY_DIR}/apr_dbd_sqlite3-2.dll) - LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_sqlite3-2.pdb) + LIST(APPEND install_modules apr_dbd_sqlite3-2) + LIST(APPEND install_bin_pdb $) 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) @@ -749,7 +749,8 @@ INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${project_name_lower}-config-version. ) # For DSO modules, install only binaries -INSTALL(FILES ${install_modules} +INSTALL(TARGETS ${install_modules} + COMPONENT RUNTIME DESTINATION ${APR_INSTALL_BIN_DIR}) IF(INSTALL_PDB)