Skip to content

Commit

Permalink
add support for generating pure static binaries
Browse files Browse the repository at this point in the history
Test: Build
  • Loading branch information
ram-mohan committed Sep 22, 2024
1 parent 2188c35 commit 603d799
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ if(UHDR_BUILD_EXAMPLES)
if(UHDR_BUILD_FUZZERS)
target_link_options(ultrahdr_app PRIVATE -fsanitize=fuzzer-no-link)
endif()
if(NOT BUILD_SHARED_LIBS AND NOT MSVC AND NOT APPLE)
target_link_options(ultrahdr_app PRIVATE -static)
endif()
target_link_libraries(ultrahdr_app PRIVATE ${UHDR_CORE_LIB_NAME})
endif()

Expand Down

0 comments on commit 603d799

Please sign in to comment.