mirror of
https://github.com/PDB-REDO/libcifpp.git
synced 2026-06-04 13:54:25 +08:00
should now work on windows
This commit is contained in:
1
.github/workflows/cmake-multi-platform.yml
vendored
1
.github/workflows/cmake-multi-platform.yml
vendored
@@ -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 }}
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user