Skip to content

Commit

Permalink
add cld3Config.cmake.in
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander ROZDAYBEDA committed Dec 27, 2023
1 parent ac7e407 commit e6eec42
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
25 changes: 25 additions & 0 deletions ports/cld3/cld3Config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(Protobuf)

# Traditional find module variables (vcpkg polyfill)
set(cld3_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
set(cld3_INCLUDE_DIRS "${cld3_INCLUDE_DIR}")
set(cld3_DIR "${cld3_INCLUDE_DIR}")

get_filename_component(_cld3_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_cld3_root "${_cld3_root}" PATH)
get_filename_component(_cld3_root "${_cld3_root}" PATH)

add_library(cld3 INTERFACE IMPORTED GLOBAL)

target_include_directories(cld3 INTERFACE ${_cld3_root}/include)

find_library(cld3_LIBRARIES NAMES cld3)
target_link_libraries(cld3 INTERFACE ${cld3_LIBRARIES})

set_property(TARGET cld3 APPEND PROPERTY IMPORTED_CONFIGURATIONS)
set(cld3_FOUND TRUE)

unset(_cld3_root)
11 changes: 10 additions & 1 deletion ports/cld3/fix-build.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2fa3908..1ff7438 100644
index 2fa3908..f6d26cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ my_protobuf_generate_cpp(cld_3/protos PROTO_SRCS PROTO_HDRS src/feature_extracto
message(STATUS "PROTO_HDRS= ${PROTO_HDRS}")

add_definitions(-fPIC) # Position Independant Code
-add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
+#add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
add_definitions(-std=c++11) # Needed for std::to_string(), ...

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${Protobuf_INCLUDE_DIRS}) # needed to include generated pb headers
@@ -58,6 +58,13 @@ add_library(${PROJECT_NAME}
src/script_span/fixunicodevalue.cc
)
Expand Down
3 changes: 3 additions & 0 deletions ports/cld3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ file(INSTALL ${HEADERS_SCRIPT_SPAN_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/i
file(GLOB HEADERS_PROTO_FILES LIST_DIRECTORIES false "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cld_3/protos/*.h")
file(INSTALL ${HEADERS_PROTO_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/cld_3/protos")

configure_file("${CMAKE_CURRENT_LIST_DIR}/cld3Config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/cld3Config.cmake" @ONLY)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
2 changes: 1 addition & 1 deletion versions/c-/cld3.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "26808b5c6093bc32902ccbc035cb4caf8ea20531",
"git-tree": "20d36c1b98aaec110437ed4a4bc301579bef9c34",
"version": "3.0.14",
"port-version": 0
}
Expand Down

0 comments on commit e6eec42

Please sign in to comment.