From a4e273437262e435940d2fd2f75b72e0cf0ab1bc Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:23:21 +0200 Subject: Use kdu target --- indra/llkdu/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra/llkdu') diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index 035fc746cf..780951cf9d 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -14,7 +14,6 @@ include(LLCommon) include(LLImage) include(LLKDU) - set(llkdu_SOURCE_FILES llimagej2ckdu.cpp llkdumem.cpp @@ -43,10 +42,14 @@ set_source_files_properties(${llkdu_SOURCE_FILES} if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) - target_link_libraries(llkdu kdu::kdu ) + target_link_libraries(llkdu kdu::kdu llimage llcommon) + set_target_include_dirs( llkdu ${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 @@ -58,7 +61,11 @@ if (USE_KDU) lltut.h ) + get_property( llimage_include_dir TARGET llimage PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) + set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES kdu::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) -- cgit v1.2.3