Skip to content

Commit

Permalink
Install gmssl.conf to /etc/ld.so.conf.d
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed May 25, 2024
1 parent b0373f3 commit 2117196
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ SET_TARGET_PROPERTIES(gmssl PROPERTIES VERSION 3.1 SOVERSION 3)
install(TARGETS gmssl ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/gmssl DESTINATION include)

if(UNIX AND NOT APPLE)
message(STATUS "Detected Linux, configuring /etc/ld.so.conf.d/gmssl.conf")
install(CODE "
execute_process(COMMAND mkdir -p /etc/ld.so.conf.d)
execute_process(COMMAND bash -c \"echo /usr/local/lib > /etc/ld.so.conf.d/gmssl.conf\")
execute_process(COMMAND ldconfig)
")
endif()


if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
add_executable(gmssl-bin ${tools})
Expand Down

0 comments on commit 2117196

Please sign in to comment.