Skip to content

Commit

Permalink
On the 'cmake-native-type' branch: Merge changes from trunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Zhakov committed Sep 3, 2024
2 parents d118eb5 + d384777 commit f7b670e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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_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 @@ -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_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 @@ -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 $<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 @@ -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 $<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 Expand Up @@ -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)
Expand Down

0 comments on commit f7b670e

Please sign in to comment.