Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/bootgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ string(REPLACE "#include \"openssl/ms/applink.c\"" "" FILE_CONTENTS "${FILE_CONT
file(WRITE ${BOOTGEN_SOURCE}/main.cpp "${FILE_CONTENTS}")

add_library(bootgen-lib STATIC ${libsources})
# bootgen must be compiled with PIE/PIC, irrespective of the remainder of
# the project, because auditwheel repair's patchelf-based RPATH rewrite
# corrupts the non-PIE binary
set_target_properties(bootgen-lib PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
set(bootgen_warning_ignores
-Wno-cast-qual
Expand Down Expand Up @@ -154,6 +158,7 @@ install(
DESTINATION include)

add_executable(bootgen ${BOOTGEN_SOURCE}/main.cpp)
set_target_properties(bootgen PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(bootgen PUBLIC ${BOOTGEN_SOURCE} ${OPENSSL_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/include)
target_compile_options(bootgen PRIVATE ${bootgen_warning_ignores})
Expand Down
Loading