Commit 51fd9dab authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : correct FLTK CMakeLists (trouble with win32)

parent 246f50c6
......@@ -190,71 +190,73 @@ 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)
IF(ZLIB_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${ZLIB_LIBRARIES})
SET(FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBZ)
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)
IF(ZLIB_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${ZLIB_LIBRARIES})
SET(FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBZ)
ELSE (ZLIB_FOUND)
MARK_AS_ADVANCED(ZLIB_INCLUDE_DIR)
MARK_AS_ADVANCED(ZLIB_LIBRARY)
IF(WIN32)
IF(NOT CYGWIN)
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(NOT CYGWIN)
ELSE(WIN32)
MESSAGE(FATAL_ERROR "Cannot find Z library.")
ENDIF(WIN32)
ENDIF (ZLIB_FOUND)
# 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)
IF(JPEG_FOUND)
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 (JPEG_FOUND)
MARK_AS_ADVANCED(JPEG_INCLUDE_DIR)
MARK_AS_ADVANCED(JPEG_LIBRARY)
IF(WIN32)
IF(NOT CYGWIN)
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(NOT CYGWIN)
ELSE(WIN32)
MESSAGE(FATAL_ERROR "Cannot find JPEG library.")
ENDIF(WIN32)
ENDIF(JPEG_FOUND)
# 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)
IF(PNG_FOUND)
IF(PNG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${PNG_LIBRARIES})
SET(FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBPNG)
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 (PNG_FOUND)
MARK_AS_ADVANCED(PNG_INCLUDE_DIR)
MARK_AS_ADVANCED(PNG_LIBRARY)
IF(WIN32)
IF(NOT CYGWIN)
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(NOT CYGWIN)
ELSE(WIN32)
MESSAGE(FATAL_ERROR "Cannot find PNG library.")
ENDIF(WIN32)
ENDIF(PNG_FOUND)
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