mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 01:55:20 +00:00
build: Remove RPATH from externals target (#3001)
This commit is contained in:
parent
ab07bc21f7
commit
d2727023b9
@ -51,7 +51,7 @@ macro(ADD_DEFAULT_LINKS TARGET ADDITIONAL)
|
||||
if(${ADDITIONAL})
|
||||
target_link_libraries(${TARGET} libosquery_additional_shared)
|
||||
endif()
|
||||
if(DEFINED ENV{FAST})
|
||||
if(DEFINED ENV{OSQUERY_BUILD_SHARED})
|
||||
target_link_libraries(${TARGET} "-Wl,-rpath,${CMAKE_BINARY_DIR}/osquery")
|
||||
endif()
|
||||
else()
|
||||
|
@ -215,9 +215,7 @@ else()
|
||||
)
|
||||
if (CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
# Only enale LTO builds when using clang on Unix, for now
|
||||
add_compile_options(
|
||||
-flto
|
||||
)
|
||||
add_compile_options(-flto)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -289,6 +287,7 @@ else()
|
||||
if (CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
# Clang on Unix uses LTO; we also need to pass -flto when linking
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
@ -466,6 +465,7 @@ execute_process(COMMAND mkdir ${MKDIR_OPTS} "${CMAKE_BINARY_DIR}/generated")
|
||||
|
||||
# We need to link some packages as dynamic/dependent.
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dylib .so .a)
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
|
||||
# Most dependent packages/libs we want static.
|
||||
if(DEFINED ENV{BUILD_LINK_SHARED})
|
||||
|
Loading…
Reference in New Issue
Block a user