Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix MSVC PDB installation #370

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading