Skip to content

Commit

Permalink
Fix MSVC PDB installation (#370)
Browse files Browse the repository at this point in the history
Fixes #369
  • Loading branch information
cosine0 authored Dec 8, 2024
1 parent c03e7b0 commit ab8052e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,6 @@ if(MINGW AND BUILD_SHARED_LIBS)
endif()

if(MSVC AND BUILD_SHARED_LIBS)
set(DLL_PDB_FILES ${PROJECT_BINARY_DIR}/pcre2-posix.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES ${PROJECT_BINARY_DIR}/pcre2-posixd.pdb ${DLL_PDB_DEBUG_FILES})
if(EXISTS ${PROJECT_SOURCE_DIR}/pcre2.rc)
set(PCRE2_SOURCES ${PCRE2_SOURCES} pcre2.rc)
endif()
Expand Down Expand Up @@ -834,6 +832,8 @@ if(PCRE2_BUILD_PCRE2_8)
target_link_libraries(pcre2-8-shared Threads::Threads)
endif()
set(TARGETS ${TARGETS} pcre2-8-shared)
set(DLL_PDB_FILES $<TARGET_PDB_FILE_DIR:pcre2-8-shared>/pcre2-8.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES $<TARGET_PDB_FILE_DIR:pcre2-8-shared>/pcre2-8d.pdb ${DLL_PDB_DEBUG_FILES})

add_library(pcre2-posix-shared SHARED ${PCRE2POSIX_HEADERS} ${PCRE2POSIX_SOURCES})
target_include_directories(pcre2-posix-shared PUBLIC ${PROJECT_SOURCE_DIR}/src)
Expand All @@ -851,8 +851,8 @@ if(PCRE2_BUILD_PCRE2_8)
target_compile_definitions(pcre2-posix-shared PUBLIC ${PCRE2POSIX_CFLAG})
target_link_libraries(pcre2-posix-shared pcre2-8-shared)
set(TARGETS ${TARGETS} pcre2-posix-shared)
set(DLL_PDB_FILES ${PROJECT_BINARY_DIR}/pcre2-8.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES ${PROJECT_BINARY_DIR}/pcre2-8d.pdb ${DLL_PDB_DEBUG_FILES})
set(DLL_PDB_FILES $<TARGET_PDB_FILE_DIR:pcre2-posix-shared>/pcre2-posix.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES $<TARGET_PDB_FILE_DIR:pcre2-posix-shared>/pcre2-posixd.pdb ${DLL_PDB_DEBUG_FILES})

if(MINGW)
if(NON_STANDARD_LIB_PREFIX)
Expand Down Expand Up @@ -923,8 +923,8 @@ if(PCRE2_BUILD_PCRE2_16)
target_link_libraries(pcre2-16-shared Threads::Threads)
endif()
set(TARGETS ${TARGETS} pcre2-16-shared)
set(DLL_PDB_FILES ${PROJECT_BINARY_DIR}/pcre2-16.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES ${PROJECT_BINARY_DIR}/pcre2-16d.pdb ${DLL_PDB_DEBUG_FILES})
set(DLL_PDB_FILES $<TARGET_PDB_FILE_DIR:pcre2-16-shared>/pcre2-16.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES $<TARGET_PDB_FILE_DIR:pcre2-16-shared>/pcre2-16d.pdb ${DLL_PDB_DEBUG_FILES})

if(MINGW)
if(NON_STANDARD_LIB_PREFIX)
Expand Down Expand Up @@ -993,8 +993,8 @@ if(PCRE2_BUILD_PCRE2_32)
target_link_libraries(pcre2-32-shared Threads::Threads)
endif()
set(TARGETS ${TARGETS} pcre2-32-shared)
set(DLL_PDB_FILES ${PROJECT_BINARY_DIR}/pcre2-32.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES ${PROJECT_BINARY_DIR}/pcre2-32d.pdb ${DLL_PDB_DEBUG_FILES})
set(DLL_PDB_FILES $<TARGET_PDB_FILE_DIR:pcre2-32-shared>/pcre2-32.pdb ${DLL_PDB_FILES})
set(DLL_PDB_DEBUG_FILES $<TARGET_PDB_FILE_DIR:pcre2-32-shared>/pcre2-32d.pdb ${DLL_PDB_DEBUG_FILES})

if(MINGW)
if(NON_STANDARD_LIB_PREFIX)
Expand Down

0 comments on commit ab8052e

Please sign in to comment.