|
@@ -124,8 +124,12 @@ include (CheckCompilerToolchain)
|
|
|
|
|
|
|
|
# Extra linker flags for linking against indirect dependencies (linking shared lib with dependencies)
|
|
# Extra linker flags for linking against indirect dependencies (linking shared lib with dependencies)
|
|
|
if (RPI)
|
|
if (RPI)
|
|
|
- # Extra linker flags for Raspbian because it installs VideoCore libraries in the "/opt/vc/lib" directory (no harm in doing so for other distros)
|
|
|
|
|
- set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-rpath-link,\"${CMAKE_SYSROOT}/opt/vc/lib\"") # CMAKE_SYSROOT is empty when not cross-compiling
|
|
|
|
|
|
|
+ if (NOT NATIVE_64BIT)
|
|
|
|
|
+ # Extra linker flags for Raspbian because it installs VideoCore libraries in the "/opt/vc/lib" directory (no harm in doing so for other distros)
|
|
|
|
|
+ set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-rpath-link,\"${CMAKE_SYSROOT}/opt/vc/lib\"") # CMAKE_SYSROOT is empty when not cross-compiling
|
|
|
|
|
+ else ()
|
|
|
|
|
+ set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-rpath-link,\"${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu\"")
|
|
|
|
|
+ endif ()
|
|
|
elseif (APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
|
|
elseif (APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
|
|
|
set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-no_weak_imports")
|
|
set (INDIRECT_DEPS_EXE_LINKER_FLAGS "${INDIRECT_DEPS_EXE_LINKER_FLAGS} -Wl,-no_weak_imports")
|
|
|
endif ()
|
|
endif ()
|