From 1f2456132e1c3a75473dfea30d26c6cff8d8257c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 6 Feb 2005 00:17:50 +0000 Subject: [PATCH] Cmake updates (STR #645) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + CMake/FLTKConfig.cmake.in | 17 ++-- CMakeLists.txt | 190 ++++++++++++++++++++++++++------------ DartConfig.cmake | 38 ++++++++ fluid/CMakeLists.txt | 2 + src/CMakeLists.txt | 25 ++++- test/CMakeLists.txt | 4 +- 7 files changed, 208 insertions(+), 69 deletions(-) create mode 100644 DartConfig.cmake diff --git a/CHANGES b/CHANGES index 01989f628..28d270a47 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692) + - Updated cmake support (STR #645) - Fl_Check_Browser didn't draw properly when inactive (STR #681) - Removed some redundant code in Fl_Group::handle() (STR diff --git a/CMake/FLTKConfig.cmake.in b/CMake/FLTKConfig.cmake.in index c32c41f20..b064c81dd 100644 --- a/CMake/FLTKConfig.cmake.in +++ b/CMake/FLTKConfig.cmake.in @@ -9,9 +9,11 @@ SET(FLTK_SOURCE_DIR "@FLTK_SOURCE_DIR@") # The FLTK include file directories. +SET(FLUID_COMMAND "@FLTK_FLUID_COMMAND@") SET(FLTK_EXECUTABLE_DIRS "@FLTK_EXECUTABLE_DIRS@") SET(FLTK_LIBRARY_DIRS "@FLTK_LIBRARY_DIRS@") SET(FLTK_LIBRARIES "fltk_images;fltk;fltk_gl;fltk_forms") +SET(FLTK_INCLUDE_DIRS "@FLTK_INCLUDE_DIRS@") # The C and C++ flags added by FLTK to the cmake-configured flags. SET(FLTK_REQUIRED_C_FLAGS "@FLTK_REQUIRED_C_FLAGS@") @@ -22,11 +24,14 @@ SET(FLTK_VERSION_MAJOR "@FLTK_VERSION_MAJOR@") SET(FLTK_VERSION_MINOR "@FLTK_VERSION_MINOR@") SET(FLTK_VERSION_PATCH "@FLTK_VERSION_PATCH@") -# The location of the UseFLTK.cmake file. -SET(FLTK_USE_FILE "@FLTK_USE_FILE@") - -# The build settings file. +# Is FLTK using shared libraries? +SET(FLTK_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") SET(FLTK_BUILD_SETTINGS_FILE "@FLTK_BUILD_SETTINGS_FILE@") -# Whether FLTK was built with shared libraries. -SET(FLTK_BUILD_SHARED "@BUILD_SHARED_LIBS@") +# The location of the UseFLTK.cmake file. +SET(FLTK11_USE_FILE "@FLTK_USE_FILE@") + +# The ExodusII library dependencies. +IF(NOT FLTK_NO_LIBRARY_DEPENDS) + INCLUDE("@FLTK_LIBRARY_DEPENDS_FILE@") +ENDIF(NOT FLTK_NO_LIBRARY_DEPENDS) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aab2209b..4fab4e4a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,26 +2,39 @@ # Written by Andy Cedilnik and Julien Jomier PROJECT(FLTK) +CMAKE_MINIMUM_REQUIRED(VERSION 2.0) -SET(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin CACHE INTERNAL +# The FLTK version +SET(FLTK_VERSION_MAJOR "1") +SET(FLTK_VERSION_MINOR "1") +SET(FLTK_VERSION_PATCH "5") +SET(FLTK_VERSION "${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}") +SET(FLTK_VERSION_FULL "${FLTK_VERSION}.${FLTK_VERSION_PATCH}") + +# Executables and libraries should just go to bin +SET(EXECUTABLE_OUTPUT_PATH "${FLTK_BINARY_DIR}/bin" CACHE INTERNAL "Where to put the executables for FLTK" ) -SET(LIBRARY_OUTPUT_PATH "${FLTK_BINARY_DIR}/lib" CACHE INTERNAL +SET(LIBRARY_OUTPUT_PATH "${FLTK_BINARY_DIR}/bin" CACHE INTERNAL "Where to put the libraries for FLTK" ) +# Allow building shared libraries +OPTION(BUILD_SHARED_LIBS "Build FLTK as a shared library" OFF) + +# Search for modules in the FLTK source dir first +SET(CMAKE_MODULE_PATH "${FLTK_SOURCE_DIR}/CMake") + #----------------------------------------------------------------------------- # Test for some required system information. -INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake) -SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL "Use the pthreads library.") - - -SET(FLTK_DATADIR "${CMAKE_INSTALL_PREFIX}/share/FLTK") -SET(FLTK_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/FLTK") - -CONFIGURE_FILE(${FLTK_SOURCE_DIR}/configh.cmake.in - ${FLTK_BINARY_DIR}/config.h) +FIND_PACKAGE(Threads) +SET (CMAKE_USE_PTHREADS + "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL "Use the pthreads library.") +# We need ansi c-flags, especially on HP +SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") +SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS}) + IF(WIN32) IF(NOT CYGWIN) IF(BORLAND) @@ -45,26 +58,21 @@ IF(APPLE) ENDIF(APPLE) IF(UNIX) - INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake) + FIND_PACKAGE(X11) SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm) ENDIF(UNIX) -IF(APPLE) - SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") -ENDIF(APPLE) +IF(APPLE AND NOT FLTK_APPLE_X11) + SET( FLTK_PLATFORM_DEPENDENT_LIBS + "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") +ENDIF(APPLE AND NOT FLTK_APPLE_X11) IF(CYGWIN) ADD_DEFINITIONS(-DWIN32) SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32) ENDIF(CYGWIN) - -INCLUDE_DIRECTORIES( - ${FLTK_BINARY_DIR} - ${FLTK_SOURCE_DIR} - ) - -INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) +INCLUDE(CheckIncludeFiles) # Check if header file exists and add it to the list. MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) CHECK_INCLUDE_FILES("${PROJECT_INCLUDES};${FILE}" ${VARIABLE}) @@ -83,12 +91,12 @@ CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H) CHECK_INCLUDE_FILE_CONCAT("sys/stdtypes.h" HAVE_SYS_STDTYPES_H) CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H) -INCLUDE(${CMAKE_ROOT}/Modules/FindZLIB.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/FindPNG.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/FindJPEG.cmake) +FIND_PACKAGE(ZLIB) +FIND_PACKAGE(PNG) +FIND_PACKAGE(JPEG) -INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) -INCLUDE(${FLTK_SOURCE_DIR}/CMake/CheckFunctionWithHeaderExists.cmake) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckFunctionWithHeaderExists) CHECK_FUNCTIONWITHHEADER_EXISTS("int strcasecmp()" "${PROJECT_INCLUDES}" HAVE_STRCASECMP) @@ -98,7 +106,7 @@ CHECK_SYMBOL_EXISTS(vsnprintf "${PROJECT_INCLUDES}" HAVE_VSNPRINTF) CHECK_SYMBOL_EXISTS(snprintf "${PROJECT_INCLUDES}" HAVE_SNPRINTF) CHECK_SYMBOL_EXISTS(scandir "${PROJECT_INCLUDES}" HAVE_SCANDIR) -INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) +INCLUDE(CheckTypeSize) CHECK_TYPE_SIZE(short SIZEOF_SHORT) CHECK_TYPE_SIZE(int SIZEOF_INT) @@ -119,20 +127,19 @@ ENDIF(${SIZEOF_INT} MATCHES "^4$") IF(${SIZEOF_INT} MATCHES "^8$") SET(U64 "unsigned") ELSE(${SIZEOF_INT} MATCHES "^8$") - INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) IF(${SIZEOF_LONG} MATCHES "^8$") SET(U64 "unsigned long") ENDIF(${SIZEOF_LONG} MATCHES "^8$") ENDIF(${SIZEOF_INT} MATCHES "^8$") -SET(HAVE_GL 0) - # Set an option to build FLTK with OpenGL support +SET(HAVE_GL 0) OPTION(USE_OPENGL "OpenGL Support" ON) IF(USE_OPENGL) - INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake) + FIND_PACKAGE(OpenGL) IF(OPENGL_FOUND) SET(HAVE_GL 1) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ENDIF(OPENGL_FOUND) ENDIF(USE_OPENGL) @@ -167,16 +174,11 @@ MACRO(PERFORM_CMAKE_TEST FILE TEST) "Performing Test ${TEST} failed with the following output:\n" "${OUTPUT}\n" APPEND) ENDIF(${TEST}) - ELSE("${TEST}" MATCHES "^${TEST}$") - # Have result - #FOREACH(tst ${TEST}) - # MESSAGE("Test ${TEST} resulted in ${${tst}}") - #ENDFOREACH(tst ${TEST}) ENDIF("${TEST}" MATCHES "^${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" ON) +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}) @@ -190,7 +192,7 @@ ELSE(FLTK_USE_SYSTEM_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" ON) +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}) @@ -204,7 +206,7 @@ ELSE(FLTK_USE_SYSTEM_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" ON) +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}) @@ -220,9 +222,14 @@ ELSE(FLTK_USE_SYSTEM_PNG) SUBDIRS(png) ENDIF(FLTK_USE_SYSTEM_PNG) -SUBDIRS(src) -SUBDIRS(fluid) +SET(FLTK_DATADIR "${CMAKE_INSTALL_PREFIX}/share/FLTK") +SET(FLTK_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/FLTK") +# Write out configuration header file +CONFIGURE_FILE(${FLTK_SOURCE_DIR}/configh.cmake.in + ${FLTK_BINARY_DIR}/config.h) + +# On unix create symlinks for backward compatibility SET(FLTK_CREATE_SYMLINKS 1) IF(WIN32) IF(NOT UNIX) @@ -233,9 +240,10 @@ ENDIF(WIN32) MACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION) IF(EXISTS "${DESTINATION}") ELSE(EXISTS "${DESTINATION}") - EXEC_PROGRAM(ln ARGS -s - "${SOURCE}" - "${DESTINATION}" OUTPUT_VARIABLE ln_output + MESSAGE(STATUS "Create symlink from: \"${SOURCE}\" to \"${DESTINATION}\"") + # The quoting here does seems unnatural, but this is to prevent bug in CMake + EXEC_PROGRAM(ln ARGS + "-s \"${SOURCE}\" \"${DESTINATION}\"" OUTPUT_VARIABLE ln_output RETURN_VALUE ln_retval) IF("${ln_retval}" GREATER 0) MESSAGE(FATAL_ERROR "Problem creatin symlink from \"${SOURCE}\" to \"${DESTINATION}\":\n${ln_output}") @@ -244,7 +252,7 @@ MACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION) ENDMACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION) # If this is out-of-source build, then copy FL directory -FILE(GLOB FLTK_HEADER_FILES "${FLTK_SOURCE_DIR}/FL/*") +FILE(GLOB FLTK_HEADER_FILES "${FLTK_SOURCE_DIR}/FL/*.[hHr]") FOREACH(file ${FLTK_HEADER_FILES}) GET_FILENAME_COMPONENT(ext "${file}" EXT) GET_FILENAME_COMPONENT(namewe "${file}" NAME_WE) @@ -255,6 +263,7 @@ FOREACH(file ${FLTK_HEADER_FILES}) SET(outfile_h "${FLTK_BINARY_DIR}/FL/${namewe}.h") SET(outfile_H "${FLTK_BINARY_DIR}/FL/${namewe}.H") CONFIGURE_FILE("${file}" "${outfile_H}" COPYONLY IMMEDIATE) + CONFIGURE_FILE("${file}" "${outfile_h}" COPYONLY IMMEDIATE) # IF(FLTK_CREATE_SYMLINKS) # SAFE_CREATE_SYMLINK("${outfile_H}" "${outfile_h}") # ENDIF(FLTK_CREATE_SYMLINKS) @@ -291,21 +300,88 @@ IF(FLTK_CREATE_SYMLINKS) ENDFOREACH(var) ENDIF(FLTK_CREATE_SYMLINKS) - # Set the fluid executable path -SET(FLUID_COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fluid) +UTILITY_SOURCE(FLUID_COMMAND fluid fluid fluid.cxx) +SET(FLUID_COMMAND "${FLUID_COMMAND}" CACHE INTERNAL "" FORCE) -# Set an option to build the tests -OPTION(BUILD_TESTS "Build the tests" ON) -IF(BUILD_TESTS) +# Include header files in fltk binary tree +INCLUDE_DIRECTORIES(${FLTK_BINARY_DIR}) + +# Do the build of fltk libraries and fluid +SUBDIRS(src) +SUBDIRS(fluid) + + +# Set an option to build the examples and testing +OPTION(BUILD_EXAMPLES "Build the tests" ON) +IF(BUILD_EXAMPLES) SUBDIRS(test) - ENABLE_TESTING() - INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake) -ENDIF(BUILD_TESTS ) +ENDIF(BUILD_EXAMPLES) -#Genereate the configuration file +OPTION(BUILD_TESTING "Build testing of FLTK" ON) +IF(BUILD_TESTING) + ENABLE_TESTING() + INCLUDE(Dart) +ENDIF(BUILD_TESTING) + +#----------------------------------------------------------------------------- +# Help outside projects build FLTK projects. +INCLUDE(CMakeExportBuildSettings) +EXPORT_LIBRARY_DEPENDENCIES(${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake) +CMAKE_EXPORT_BUILD_SETTINGS(${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake) +SET(FL_MAJOR_VERSION "${FLTK_VERSION_MAJOR}") +SET(FL_MINOR_VERSION "${FLTK_VERSION_MINOR}") +SET(FL_PATCH_VERSION "${FLTK_VERSION_PATCH}") + +SET(CFLAGS "${CMAKE_C_FLAGS}") +SET(CXXFLAGS "${CMAKE_CXX_FLAGS}") +SET(CC "${CMAKE_C_COMPILER}") +SET(CXX "${CMAKE_CXX_COMPILER}") + +# For build tree usage +SET(FLTK_FLUID_COMMAND "${FLUID_COMMAND}") +SET(FLTK_LIBRARY_DEPENDS_FILE ${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake) SET(FLTK_EXECUTABLE_DIRS ${EXECUTABLE_OUTPUT_PATH}) SET(FLTK_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH}) +SET(FLTK_USE_FILE ${FLTK_SOURCE_DIR}/CMake/FLTKUse.cmake) +SET(FLTK_INCLUDE_DIRS "${FLTK_BINARY_DIR}/FL") +SET(FLTK_BUILD_SETTINGS_FILE ${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake) +SET(prefix "${FLTK_BINARY_DIR}") +SET(exec_prefix "${prefix}") +SET(exec_prefix_set "no") +SET(bindir "${prefix}/bin") +SET(includedir "${prefix}") +SET(libdir "${prefix}/bin") +SET(srcdir "${FLTK_SOURCE_DIR}") -CONFIGURE_FILE(${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in - ${FLTK_BINARY_DIR}/FLTKConfig.cmake) +CONFIGURE_FILE("${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in" + "${FLTK_BINARY_DIR}/FLTKConfig.cmake" @ONLY IMMEDIATE) +CONFIGURE_FILE("${FLTK_SOURCE_DIR}/fltk-config.in" + "${FLTK_BINARY_DIR}/fltk-config" @ONLY IMMEDIATE) + +# For installed tree usage +SET(FLTK_FLUID_COMMAND "${CMAKE_INSTALL_PREFIX}/bin/fluid") +SET(FLTK_LIBRARY_DEPENDS_FILE ${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKLibraryDepends.cmake) +SET(FLTK_EXECUTABLE_DIRS "${CMAKE_INSTALL_PREFIX}/bin") +SET(FLTK_LIBRARY_DIRS "${CMAKE_INSTALL_PREFIX}/lib") +SET(FLTK_USE_FILE "${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKUse.cmake") +SET(FLTK_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/FL") +SET(FLTK_BUILD_SETTINGS_FILE ${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKBuildSettings.cmake) +SET(prefix "${CMAKE_INSTALL_PREFIX}") +SET(exec_prefix "${prefix}") +SET(exec_prefix_set "no") +SET(bindir "${prefix}/bin") +SET(includedir "${prefix}") +SET(libdir "${prefix}/lib") +SET(srcdir ".") + +CONFIGURE_FILE("${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in" + "${FLTK_BINARY_DIR}/CMake/FLTKConfig.cmake" @ONLY IMMEDIATE) +CONFIGURE_FILE("${FLTK_SOURCE_DIR}/fltk-config.in" + "${FLTK_BINARY_DIR}/CMake/fltk-config" @ONLY IMMEDIATE) + +INSTALL_FILES(/include/FL FILES ${FLTK_HEADER_FILES}) +INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_SOURCE_DIR}/CMake/FLTKUse.cmake") +INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake") +INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake") +INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/CMake/FLTKConfig.cmake") diff --git a/DartConfig.cmake b/DartConfig.cmake new file mode 100644 index 000000000..90e1ff663 --- /dev/null +++ b/DartConfig.cmake @@ -0,0 +1,38 @@ +# Dashboard is opened for submissions for a 24 hour period starting at +# the specified NIGHLY_START_TIME. Time is specified in 24 hour format. +SET (NIGHTLY_START_TIME "21:00:00 EDT") + +# Dart server to submit results (used by client) +SET (DROP_METHOD "http") +SET (DROP_SITE "public.kitware.com") +SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi") +SET (TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Fltk-TestingResults.pl") + +# Project Home Page +SET (PROJECT_URL "http://www.fltk.org") + +# Dart server configuration +SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/fltk-rollup-dashboard.sh") +SET (CVS_WEB_URL "http://cvs.sourceforge.net/viewcvs.py/fltk/fltk/") +SET (CVS_WEB_CVSROOT "fltk") + +SET (USE_GNATS "On") +SET (GNATS_WEB_URL "http://www.fltk.org/str.php") + +# Continuous email delivery variables +SET (CONTINUOUS_FROM "fltk-dashboard@public.kitware.com") +SET (SMTP_MAILHOST "public.kitware.com") +SET (CONTINUOUS_MONITOR_LIST "fltk-dashboard@public.kitware.com") +SET (CONTINUOUS_BASE_URL "http://public.kitware.com/Fltk/Testing") + +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES ON) +SET (DELIVER_BROKEN_BUILD_EMAIL "Continuous Nightly") +SET (EMAIL_FROM "fltk-dashboard@public.kitware.com") +SET (DARTBOARD_BASE_URL "http://public.kitware.com/Fltk/Testing") + +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_CONFIGURE_FAILURES 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_ERRORS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_WARNINGS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_NOT_RUNS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES 1) + diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt index dba571be0..9fc596842 100644 --- a/fluid/CMakeLists.txt +++ b/fluid/CMakeLists.txt @@ -23,3 +23,5 @@ TARGET_LINK_LIBRARIES(fluid fltk fltk_images fltk_forms ${FLTK_PLATFORM_DEPENDEN IF(OPENGL_FOUND) TARGET_LINK_LIBRARIES(fluid fltk_gl) ENDIF(OPENGL_FOUND) + +INSTALL_TARGETS(/bin fluid) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84c9f26ce..733858112 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -161,11 +161,11 @@ SET(CFILES vsnprintf.c ) -# We need ansi c-flags, especially on HP -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") -SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS}) - ADD_LIBRARY(fltk ${CPPFILES} ${CFILES}) +SET_TARGET_PROPERTIES(fltk + PROPERTIES + VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} + SOVERSION ${FLTK_VERSION_PATCH}) TARGET_LINK_LIBRARIES(fltk ${FLTK_PLATFORM_DEPENDENT_LIBS} ${CMAKE_THREAD_LIBS_INIT}) @@ -176,13 +176,25 @@ ENDIF(X11_FOUND) IF(OPENGL_FOUND) ADD_LIBRARY(fltk_gl ${GLCPPFILES}) TARGET_LINK_LIBRARIES(fltk_gl fltk ${OPENGL_LIBRARIES}) + SET_TARGET_PROPERTIES(fltk_gl + PROPERTIES + VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} + SOVERSION ${FLTK_VERSION_PATCH}) ENDIF(OPENGL_FOUND) ADD_LIBRARY(fltk_forms ${FLCPPFILES}) TARGET_LINK_LIBRARIES(fltk_forms fltk) +SET_TARGET_PROPERTIES(fltk_forms + PROPERTIES + VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} + SOVERSION ${FLTK_VERSION_PATCH}) ADD_LIBRARY(fltk_images ${IMGCPPFILES}) TARGET_LINK_LIBRARIES(fltk_images fltk) +SET_TARGET_PROPERTIES(fltk_images + PROPERTIES + VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} + SOVERSION ${FLTK_VERSION_PATCH}) IF(HAVE_LIBPNG) TARGET_LINK_LIBRARIES(fltk_images ${PNG_LIBRARIES}) @@ -191,3 +203,8 @@ ENDIF(HAVE_LIBPNG) IF(HAVE_LIBJPEG) TARGET_LINK_LIBRARIES(fltk_images ${JPEG_LIBRARIES}) ENDIF(HAVE_LIBJPEG) + +INSTALL_TARGETS(/lib fltk) +INSTALL_TARGETS(/lib fltk_gl) +INSTALL_TARGETS(/lib fltk_forms) +INSTALL_TARGETS(/lib fltk_images) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6cef50ee1..34c0e7096 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,12 +9,12 @@ MACRO(CREATE_EXAMPLE NAME SOURCES LIBRARIES) SET(srcs ${srcs} "${cxx_name}") ADD_CUSTOM_COMMAND( OUTPUT ${cxx_name} - DEPENDS ${fluid_name} + DEPENDS "${fluid_name}" "${FLUID_COMMAND}" COMMAND ${FLUID_COMMAND} ARGS -c ${fluid_name}) ADD_CUSTOM_COMMAND( OUTPUT ${h_name} - DEPENDS ${fluid_name} + DEPENDS "${fluid_name}" "${FLUID_COMMAND}" COMMAND ${FLUID_COMMAND} ARGS -c ${fluid_name}) ELSE("${src}" MATCHES ".fl$")