Put find logic for KDU/GLOD into their own cmake files.
parent
73775e3472
commit
ec56ad955f
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
find_library( GLOD_LIBRARY GLOD )
|
||||
find_library( VDS_LIBRARY vds )
|
||||
find_path( GLOD_INCLUDE_DIR glod/glod.h )
|
||||
|
||||
if( GLOD_INCLUDE_DIR STREQUAL "GLOD_INCLUDE_DIR-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find glod include dir" )
|
||||
endif()
|
||||
if( GLOD_LIBRARY STREQUAL "GLOD_LIBRARY-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find library GLOD.a" )
|
||||
endif()
|
||||
if( VDS_LIBRARY STREQUAL "VDS_LIBRARY-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find library vds.a" )
|
||||
endif()
|
||||
set(GLOD_LIBRARIES ${GLOD_LIBRARY} ${VDS_LIBRARY} )
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
find_path( KDU_INCLUDE_DIR kdu/kdu_image.h )
|
||||
find_library( KDU_LIBRARY kdu_x64 )
|
||||
|
||||
if ( NOT KDU_LIBRARY OR NOT KDU_INCLUDE_DIR )
|
||||
message(FATAL_ERROR "Cannot find KDU: Library '${KDU_LIBRARY}'; header '${KDU_INCLUDE_DIR}' ")
|
||||
endif()
|
||||
|
||||
set( KDU_INCLUDE_DIR ${KDU_INCLUDE_DIR}/kdu )
|
||||
set( LLKDU_LIBRARIES llkdu )
|
||||
|
|
@ -6,21 +6,6 @@ if (NOT USESYSTEMLIBS)
|
|||
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
set(GLOD_LIBRARIES GLOD vds)
|
||||
else()
|
||||
|
||||
find_library( GLOD_LIBRARY GLOD )
|
||||
find_library( VDS_LIBRARY vds )
|
||||
find_path( GLOD_INCLUDE_DIR glod/glod.h )
|
||||
|
||||
if( GLOD_INCLUDE_DIR STREQUAL "GLOD_INCLUDE_DIR-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find glod include dir" )
|
||||
endif()
|
||||
if( GLOD_LIBRARY STREQUAL "GLOD_LIBRARY-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find library GLOD.a" )
|
||||
endif()
|
||||
if( VDS_LIBRARY STREQUAL "VDS_LIBRARY-NOTFOUND" )
|
||||
message( FATAL_ERROR "Cannot find library vds.a" )
|
||||
endif()
|
||||
set(GLOD_LIBRARIES ${GLOD_LIBRARY} ${VDS_LIBRARY} )
|
||||
|
||||
include(FindGLOD)
|
||||
endif (NOT USESYSTEMLIBS)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,7 @@ endif (INSTALL_PROPRIETARY)
|
|||
|
||||
if (USE_KDU)
|
||||
if (USESYSTEMLIBS)
|
||||
find_path( KDU_INCLUDE_DIR kdu/kdu_image.h )
|
||||
find_library( KDU_LIBRARY kdu_x64 )
|
||||
if ( NOT KDU_LIBRARY OR NOT KDU_INCLUDE_DIR )
|
||||
message(FATAL_ERROR "Cannot find KDU: Library '${KDU_LIBRARY}'; header '${KDU_INCLUDE_DIR}' ")
|
||||
endif()
|
||||
set( KDU_INCLUDE_DIR ${KDU_INCLUDE_DIR}/kdu )
|
||||
set( LLKDU_LIBRARIES llkdu )
|
||||
include(FindKDU)
|
||||
else()
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(kdu)
|
||||
|
|
|
|||
Loading…
Reference in New Issue