34 lines
983 B
CMake
34 lines
983 B
CMake
# -*- cmake -*-
|
|
|
|
# USE_KDU can be set when launching cmake as an option using the argument -DUSE_KDU:BOOL=ON
|
|
# When building using proprietary binaries though (i.e. having access to LL private servers),
|
|
# we always build with KDU
|
|
if (INSTALL_PROPRIETARY)
|
|
set(USE_KDU ON CACHE BOOL "Use Kakadu library.")
|
|
endif (INSTALL_PROPRIETARY)
|
|
|
|
set( ND_KDU_SUFFIX "" )
|
|
if( ADDRESS_SIZE EQUAL 64 )
|
|
if( WINDOWS OR LINUX )
|
|
set( ND_KDU_SUFFIX "_x64" )
|
|
endif( WINDOWS OR LINUX )
|
|
endif( ADDRESS_SIZE EQUAL 64 )
|
|
|
|
include_guard()
|
|
add_library( ll::kdu INTERFACE IMPORTED )
|
|
|
|
if (USE_KDU)
|
|
include(Prebuilt)
|
|
use_prebuilt_binary(kdu)
|
|
if (WINDOWS)
|
|
target_link_libraries( ll::kdu INTERFACE kdu${ND_KDU_SUFFIX}.lib)
|
|
else (WINDOWS)
|
|
target_link_libraries( ll::kdu INTERFACE libkdu${ND_KDU_SUFFIX}.a)
|
|
endif (WINDOWS)
|
|
|
|
target_include_directories( ll::kdu SYSTEM INTERFACE
|
|
${AUTOBUILD_INSTALL_DIR}/include/kdu
|
|
${LIBS_OPEN_DIR}/llkdu
|
|
)
|
|
endif (USE_KDU)
|