Commit 3213ba42 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

BUG:num 0000132 use system lib with internal FLTK

parent 8f834318
......@@ -26,15 +26,15 @@ int main( int argc, char *argv[] )
{
if (argc < 1)
{
std::cout << "Usage : inputImage" << std::endl ;
std::cout << "Usage : inputImage" << std::endl;
return EXIT_FAILURE;
}
char * filename = argv[1];
typedef double PixelType;
typedef otb::VectorImage< PixelType > ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
typedef double PixelType;
typedef otb::VectorImage< PixelType > ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
// check for input images
ReaderType::Pointer reader = ReaderType::New();
......
......@@ -189,46 +189,51 @@ MACRO(PERFORM_CMAKE_TEST FILE TEST)
ENDMACRO(PERFORM_CMAKE_TEST FILE TEST)
# Set an option to build the zlib library or not
OPTION(FLTK_USE_SYSTEM_ZLIB "Use's system zlib" OFF)
IF(FLTK_USE_SYSTEM_ZLIB)
# OPTION(FLTK_USE_SYSTEM_ZLIB "Use's system zlib" OFF)
# IF(FLTK_USE_SYSTEM_ZLIB)
IF(ZLIB_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${ZLIB_LIBRARIES})
SET(FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBZ)
ENDIF(ZLIB_FOUND)
ELSE (ZLIB_FOUND)
MESSAGE(FATAL_ERROR "Cannot find Z library.")
ENDIF (ZLIB_FOUND)
# We build the fltk zlib
ELSE(FLTK_USE_SYSTEM_ZLIB)
MARK_AS_ADVANCED(ZLIB_INCLUDE_DIR)
MARK_AS_ADVANCED(ZLIB_LIBRARY)
SUBDIRS(zlib)
SET(HAVE_LIBZ 1)
SET(FLTK_ZLIB_LIBRARIES fltk_zlib)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_zlib")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/zlib")
ENDIF(FLTK_USE_SYSTEM_ZLIB)
# ELSE(FLTK_USE_SYSTEM_ZLIB)
# MARK_AS_ADVANCED(ZLIB_INCLUDE_DIR)
# MARK_AS_ADVANCED(ZLIB_LIBRARY)
# SUBDIRS(zlib)
# SET(HAVE_LIBZ 1)
# SET(FLTK_ZLIB_LIBRARIES fltk_zlib)
# SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_zlib")
# INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/zlib")
# ENDIF(FLTK_USE_SYSTEM_ZLIB)
# Set an option to build the jpeg library or not
OPTION(FLTK_USE_SYSTEM_JPEG "Use's system jpeg" OFF)
IF(FLTK_USE_SYSTEM_JPEG)
#OPTION(FLTK_USE_SYSTEM_JPEG "Use's system jpeg" OFF)
# IF(FLTK_USE_SYSTEM_JPEG)
IF(JPEG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${JPEG_LIBRARIES})
SET(FLTK_JPEG_LIBRARIES ${JPEG_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBJPEG)
ELSE (JPEG_FOUND)
MESSAGE(FATAL_ERROR "Cannot find JPEG library.")
ENDIF(JPEG_FOUND)
# We build the fltk png
ELSE(FLTK_USE_SYSTEM_JPEG)
MARK_AS_ADVANCED(JPEG_INCLUDE_DIR)
MARK_AS_ADVANCED(JPEG_LIBRARY)
SUBDIRS(jpeg)
SET(HAVE_LIBJPEG 1)
SET(FLTK_JPEG_LIBRARIES fltk_jpeg)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_jpeg")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/jpeg")
ENDIF(FLTK_USE_SYSTEM_JPEG)
# ELSE(FLTK_USE_SYSTEM_JPEG)
# MARK_AS_ADVANCED(JPEG_INCLUDE_DIR)
# MARK_AS_ADVANCED(JPEG_LIBRARY)
# SUBDIRS(jpeg)
# SET(HAVE_LIBJPEG 1)
# SET(FLTK_JPEG_LIBRARIES fltk_jpeg)
# SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_jpeg")
# INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/jpeg")
# ENDIF(FLTK_USE_SYSTEM_JPEG)
# Set an option to build the png library or not
OPTION(FLTK_USE_SYSTEM_PNG "Use's system png" OFF)
IF(FLTK_USE_SYSTEM_PNG)
# OPTION(FLTK_USE_SYSTEM_PNG "Use's system png" OFF)
# IF(FLTK_USE_SYSTEM_PNG)
IF(PNG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${PNG_LIBRARIES})
SET(FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
......@@ -236,18 +241,20 @@ IF(FLTK_USE_SYSTEM_PNG)
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_PNG_GET_VALID)
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_PNG_SET_TRNS_TO_ALPHA)
SET(HAVE_PNG_H 1)
ELSE (PNG_FOUND)
MESSAGE(FATAL_ERROR "Cannot find PNG library.")
ENDIF(PNG_FOUND)
# We build the fltk png
ELSE(FLTK_USE_SYSTEM_PNG)
MARK_AS_ADVANCED(PNG_INCLUDE_DIR)
MARK_AS_ADVANCED(PNG_LIBRARY)
SUBDIRS(png)
SET(HAVE_LIBPNG 1)
SET(HAVE_PNG_H 1)
SET(FLTK_PNG_LIBRARIES fltk_png)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_png")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/png")
ENDIF(FLTK_USE_SYSTEM_PNG)
# ELSE(FLTK_USE_SYSTEM_PNG)
# MARK_AS_ADVANCED(PNG_INCLUDE_DIR)
# MARK_AS_ADVANCED(PNG_LIBRARY)
# SUBDIRS(png)
# SET(HAVE_LIBPNG 1)
# SET(HAVE_PNG_H 1)
# SET(FLTK_PNG_LIBRARIES fltk_png)
# SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_png")
# INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/png")
# ENDIF(FLTK_USE_SYSTEM_PNG)
SET(FLTK_DATADIR "${CMAKE_INSTALL_PREFIX}/share/FLTK")
SET(FLTK_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/FLTK")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment