should now work on windows

This commit is contained in:
Maarten L. Hekkelman
2025-08-26 15:16:01 +02:00
parent 7920491309
commit 7cfaf051ba
2 changed files with 7 additions and 8 deletions

View File

@@ -43,7 +43,6 @@ jobs:
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-G Ninja
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}

View File

@@ -21,12 +21,12 @@ endif()
if(NOT PCRE2_FOUND)
find_path(PCRE2_INCLUDEDIR NAMES pcre2.h HINTS "C:/Program Files (x86)/PCRE2/include" REQUIRED)
find_library(PCRE2_LIBRARY NAMES pcre2-8-static pcre2-8 HINTS "C:/Program Files (x86)/PCRE2/lib" REQUIRED)
find_library(PCRE2_LIBRARY NAMES pcre2-8-static HINTS "C:/Program Files (x86)/PCRE2/lib" REQUIRED)
add_library(pcre2-8 SHARED IMPORTED)
set_target_properties(pcre2-8 PROPERTIES INCLUDE_DIRECTORIES "${PCRE2_INCLUDEDIR}")
set_target_properties(pcre2-8 PROPERTIES IMPORTED_LOCATION "${PCRE2_LIBRARY}")
if(WIN32)
set_target_properties(pcre2-8 PROPERTIES IMPORTED_IMPLIB "${PCRE2_LIBRARY}")
endif()
add_library(pcre2-8 IMPORTED STATIC)
target_include_directories(pcre2-8 INTERFACE ${PCRE2_INCLUDEDIR})
target_compile_definitions(pcre2-8 INTERFACE PCRE2_STATIC)
# target_link_libraries(pcre2-8 INTERFACE ${PCRE2_LIBRARY})
set_target_properties(pcre2-8 PROPERTIES IMPORTED_LOCATION ${PCRE2_LIBRARY})
set_target_properties(pcre2-8 PROPERTIES IMPORTED_IMPLIB ${PCRE2_LIBRARY})
endif()