From 389f7582e58e917e3d8533381fed22d9adb14afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Fri, 2 Feb 2018 03:42:25 +0100 Subject: [PATCH] Fix linking of bc7, needs symbols from nvmath If nvtt is build with -Wl,--as-needed, the linker will not resolve bc7 symbols from any library listed earlier, make sure it (also) appears after libbc7.a --- src/bc7/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt index 2eb01c0..ab952f0 100644 --- a/src/bc7/CMakeLists.txt +++ b/src/bc7/CMakeLists.txt @@ -23,6 +23,8 @@ SET(BC7_SRCS ADD_LIBRARY(bc7 STATIC ${BC7_SRCS}) +TARGET_LINK_LIBRARIES(bc7 nvmath) + IF(NOT WIN32) IF(CMAKE_COMPILER_IS_GNUCXX) SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC)