summaryrefslogtreecommitdiff
path: root/indra/llkdu/CMakeLists.txt
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
commit4e306c90666094a7450f4d6f3ed7c8b71527e393 (patch)
tree4e52cfe3cfc7df8060ec5336f53d91636986b43c /indra/llkdu/CMakeLists.txt
parentb44ad50f75724a5d9e53bd52d2724111568caf24 (diff)
parent7d144fcb2a1b0aff1b59e378c652649c3d03e94f (diff)
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/llkdu/CMakeLists.txt')
-rw-r--r--indra/llkdu/CMakeLists.txt35
1 files changed, 13 insertions, 22 deletions
diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt
index cb0e204e91..7cd9f5eb24 100644
--- a/indra/llkdu/CMakeLists.txt
+++ b/indra/llkdu/CMakeLists.txt
@@ -13,15 +13,6 @@ include(00-Common)
include(LLCommon)
include(LLImage)
include(LLKDU)
-include(LLMath)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${KDU_INCLUDE_DIR}
- ${LLKDU_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- )
set(llkdu_SOURCE_FILES
llimagej2ckdu.cpp
@@ -30,14 +21,10 @@ set(llkdu_SOURCE_FILES
set(llkdu_HEADER_FILES
CMakeLists.txt
-
llimagej2ckdu.h
llkdumem.h
)
-set_source_files_properties(${llkdu_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
-
list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES})
# Our KDU package is built with KDU_X86_INTRINSICS in its .vcxproj file.
@@ -51,11 +38,14 @@ set_source_files_properties(${llkdu_SOURCE_FILES}
if (USE_KDU)
add_library (llkdu ${llkdu_SOURCE_FILES})
- target_link_libraries(llkdu
- ${KDU_LIBRARY})
-
+ target_link_libraries(llkdu ll::kdu llimage llcommon)
+ target_include_directories( llkdu INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+
# Add tests
- if (LL_TESTS)
+ # ND: llkdu tests are very strange as they include stubs for KDU classes/methods
+ # if not having access to the right KDU version this test will fail to compile, incidentally I do not
+ # have access to a matching version of KDU and thus cannot get this tests to compile
+ if (LL_TESTS_KDU)
include(LLAddBuildTest)
include(Tut)
SET(llkdu_TEST_SOURCE_FILES
@@ -66,11 +56,12 @@ if (USE_KDU)
llkdumem.h
lltut.h
)
- SET(llkdu_test_additional_INCLUDE_DIRS
- ${KDU_INCLUDE_DIR}
- ${LLKDU_INCLUDE_DIRS}
- )
+
+ get_property( llimage_include_dir TARGET llimage PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
+ set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES ll::kdu llcommon)
+ set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_INCLUDE_DIRS ${llimage_include_dir})
+
LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}")
- endif (LL_TESTS)
+ endif (LL_TESTS_KDU)
endif (USE_KDU)