Skip to content

Commit e17f11f

Browse files
Copilotqzhuyan
andauthored
Fix symlink to use relative path to avoid EMQX packaging failures (#386)
* Initial plan * Fix symlink to use relative path to avoid packaging issues Co-authored-by: qzhuyan <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: qzhuyan <[email protected]>
1 parent 1797285 commit e17f11f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,15 @@ set_target_properties(quicer_nif
213213
include(GNUInstallDirs)
214214
install(TARGETS quicer_nif LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}/priv/)
215215

216+
# Calculate relative path for symlink to avoid absolute path issues during packaging
217+
file(RELATIVE_PATH QUICER_NIF_RELATIVE_PATH
218+
"${PROJECT_SOURCE_DIR}/priv"
219+
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libquicer_nif.so")
220+
216221
add_custom_command(
217222
TARGET quicer_nif POST_BUILD
218223
COMMAND ${CMAKE_COMMAND} -E create_symlink
219-
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libquicer_nif.so
224+
${QUICER_NIF_RELATIVE_PATH}
220225
${PROJECT_SOURCE_DIR}/priv/libquicer_nif.so)
221226

222227
## workaround for emqx forked rebar3

0 commit comments

Comments
 (0)