Skip to content

Commit

Permalink
update(cmake): Make sure we install our library on Windows
Browse files Browse the repository at this point in the history
We build re2.lib on Windows; make sure we install that.

Signed-off-by: Gerald Combs <[email protected]>
  • Loading branch information
geraldcombs authored and poiana committed Dec 16, 2023
1 parent 3b75dac commit f899909
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/modules/re2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ else()

if(NOT WIN32)
set(RE2_LIB "${RE2_SRC}/lib/libre2${RE2_LIB_SUFFIX}")
set(RE2_LIB_PATTERN "libre2*")
ExternalProject_Add(re2
PREFIX "${PROJECT_BINARY_DIR}/re2-prefix"
URL "${RE2_URL}"
Expand All @@ -53,6 +54,7 @@ else()
-DCMAKE_INSTALL_PREFIX=${RE2_SRC})
else()
set(RE2_LIB "${RE2_SRC}/lib/re2.lib")
set(RE2_LIB_PATTERN "re2.lib")
# see: https://cmake.org/cmake/help/latest/policy/CMP0091.html
if(CMAKE_VERSION VERSION_LESS 3.15.0)
ExternalProject_Add(re2
Expand Down Expand Up @@ -87,7 +89,7 @@ else()

install(DIRECTORY ${RE2_SRC}/lib/ DESTINATION "${CMAKE_INSTALL_LIBDIR}/${LIBS_PACKAGE_NAME}"
COMPONENT "libs-deps"
FILES_MATCHING PATTERN "libre2*")
FILES_MATCHING PATTERN ${RE2_LIB_PATTERN})
install(DIRECTORY "${RE2_INCLUDE}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}"
COMPONENT "libs-deps")
endif()
Expand Down

0 comments on commit f899909

Please sign in to comment.