Provide for standalone builds with KDU.
parent
6eb5657565
commit
b80860e244
|
|
@ -0,0 +1,40 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
# - Find KDU
|
||||
# This module defines
|
||||
# KDU_INCLUDE_DIR, where to find kdu.h, etc.
|
||||
# KDU_LIBRARIES, the library needed to use KDU.
|
||||
# KDU_FOUND, If false, do not try to use KDU.
|
||||
|
||||
# LL coded the #include with a glod path in llfloatermodelpreview.cpp
|
||||
find_path(KDU_INCLUDE_DIR kdu_image.h
|
||||
PATH_SUFFIXES kdu
|
||||
)
|
||||
|
||||
set(KDU_NAMES ${KDU_NAMES} kdu)
|
||||
find_library(KDU_LIBRARIES
|
||||
NAMES ${KDU_NAMES}
|
||||
)
|
||||
|
||||
if (KDU_LIBRARIES AND KDU_INCLUDE_DIR)
|
||||
set(KDU_FOUND "YES")
|
||||
set(KDU_INCLUDE_DIRS ${KDU_INCLUDE_DIR})
|
||||
set(KDU_LIBRARY ${KDU_LIBRARIES})
|
||||
else (KDU_LIBRARIES AND KDU_INCLUDE_DIR)
|
||||
set(KDU_FOUND "NO")
|
||||
endif (KDU_LIBRARIES AND KDU_INCLUDE_DIR)
|
||||
|
||||
if (KDU_FOUND)
|
||||
if (NOT KDU_FIND_QUIETLY)
|
||||
message(STATUS "Found KDU: Library in '${KDU_LIBRARY}' and header in '${KDU_INCLUDE_DIR}' ")
|
||||
endif (NOT KDU_FIND_QUIETLY)
|
||||
else (KDU_FOUND)
|
||||
if (KDU_FIND_REQUIRED)
|
||||
message(FATAL_ERROR " * * * * *\nCould not find KDU library!\n* * * * *")
|
||||
endif (KDU_FIND_REQUIRED)
|
||||
endif (KDU_FOUND)
|
||||
|
||||
mark_as_advanced(
|
||||
KDU_LIBRARIES
|
||||
KDU_INCLUDE_DIR
|
||||
)
|
||||
|
|
@ -8,14 +8,18 @@ if (INSTALL_PROPRIETARY)
|
|||
endif (INSTALL_PROPRIETARY)
|
||||
|
||||
if (USE_KDU)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(kdu)
|
||||
if (WINDOWS)
|
||||
set(KDU_LIBRARY kdu.lib)
|
||||
else (WINDOWS)
|
||||
set(KDU_LIBRARY libkdu.a)
|
||||
endif (WINDOWS)
|
||||
set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
|
||||
if (STANDALONE)
|
||||
include(FindKDU)
|
||||
else (STANDALONE)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(kdu)
|
||||
if (WINDOWS)
|
||||
set(KDU_LIBRARY kdu.lib)
|
||||
else (WINDOWS)
|
||||
set(KDU_LIBRARY libkdu.a)
|
||||
endif (WINDOWS)
|
||||
set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
|
||||
endif (STANDALONE)
|
||||
set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
|
||||
set(LLKDU_LIBRARIES llkdu)
|
||||
add_definitions( -DUSE_KDU )
|
||||
|
|
|
|||
Loading…
Reference in New Issue