Skip to content

Commit 831b8d6

Browse files
committed
build fix
1 parent 898a5a3 commit 831b8d6

1 file changed

Lines changed: 89 additions & 1 deletion

File tree

vcpkg-overlay/kagome-crates/portfile.cmake

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,93 @@ vcpkg_from_github(
77
)
88
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
99
vcpkg_cmake_install()
10-
vcpkg_cmake_config_fixup(PACKAGE_NAME "kagome-crates")
10+
11+
file(WRITE "${CURRENT_PACKAGES_DIR}/share/jam_crust/jam_crustConfig.cmake" "
12+
include(GNUInstallDirs)
13+
14+
get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE)
15+
16+
set(lib_path \"\${_IMPORT_PREFIX}/lib\")
17+
18+
if(NOT TARGET jam_crust::jam_crust)
19+
set(static_lib_name \"\${CMAKE_STATIC_LIBRARY_PREFIX}jam_crust\${CMAKE_STATIC_LIBRARY_SUFFIX}\")
20+
set(static_lib_path \"\${lib_path}/\${static_lib_name}\")
21+
22+
if(EXISTS \${static_lib_path})
23+
set(lib_file_path \${static_lib_path})
24+
else()
25+
message(FATAL_ERROR \"jam_crust library (\${static_lib_name}) not found in \${lib_path} !\")
26+
endif()
27+
28+
add_library(jam_crust::jam_crust STATIC IMPORTED GLOBAL)
29+
30+
if (UNIX AND NOT APPLE)
31+
target_link_libraries(jam_crust::jam_crust INTERFACE
32+
pthread
33+
-Wl,--no-as-needed
34+
dl
35+
)
36+
elseif (APPLE)
37+
find_library(Security Security)
38+
set_target_properties(jam_crust::jam_crust PROPERTIES
39+
INTERFACE_LINK_LIBRARIES \${Security}
40+
)
41+
endif ()
42+
43+
set_target_properties(jam_crust::jam_crust PROPERTIES
44+
INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/include\"
45+
IMPORTED_LOCATION \${lib_file_path}
46+
)
47+
endif()
48+
49+
unset(static_lib_name)
50+
unset(static_lib_path)
51+
unset(lib_path)
52+
unset(lib_file_path)
53+
")
54+
55+
file(WRITE "${CURRENT_PACKAGES_DIR}/share/schnorrkel_crust/schnorrkel_crustConfig.cmake" "
56+
include(GNUInstallDirs)
57+
58+
get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE)
59+
60+
set(lib_path \"\${_IMPORT_PREFIX}/lib\")
61+
62+
if(NOT TARGET schnorrkel_crust::schnorrkel_crust)
63+
set(static_lib_name \"\${CMAKE_STATIC_LIBRARY_PREFIX}schnorrkel_crust\${CMAKE_STATIC_LIBRARY_SUFFIX}\")
64+
set(static_lib_path \"\${lib_path}/\${static_lib_name}\")
65+
66+
if(EXISTS \${static_lib_path})
67+
set(lib_file_path \${static_lib_path})
68+
else()
69+
message(FATAL_ERROR \"schnorrkel_crust library (\${static_lib_name}) not found in \${lib_path} !\")
70+
endif()
71+
72+
add_library(schnorrkel_crust::schnorrkel_crust STATIC IMPORTED GLOBAL)
73+
74+
if (UNIX AND NOT APPLE)
75+
target_link_libraries(schnorrkel_crust::schnorrkel_crust INTERFACE
76+
pthread
77+
-Wl,--no-as-needed
78+
dl
79+
)
80+
elseif (APPLE)
81+
find_library(Security Security)
82+
set_target_properties(schnorrkel_crust::schnorrkel_crust PROPERTIES
83+
INTERFACE_LINK_LIBRARIES \${Security}
84+
)
85+
endif ()
86+
87+
set_target_properties(schnorrkel_crust::schnorrkel_crust PROPERTIES
88+
INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/include\"
89+
IMPORTED_LOCATION \${lib_file_path}
90+
)
91+
endif()
92+
93+
unset(static_lib_name)
94+
unset(static_lib_path)
95+
unset(lib_path)
96+
unset(lib_file_path)
97+
")
98+
1199
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

0 commit comments

Comments
 (0)