"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CMakeLists.txt" between
udunits-2.2.26.tar.gz and udunits-2.2.28.tar.gz

About: UDUNITS supports units of physical quantities. Its C library provides for arithmetic manipulation of units and for conversion of numeric values between compatible units.

CMakeLists.txt  (udunits-2.2.26):CMakeLists.txt  (udunits-2.2.28)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 3.19)
PROJECT(udunits C) PROJECT(udunits VERSION 2.2.28
DESCRIPTION "C library and utility for units of physical quantities")
SET(VERSION_MAJOR 2) set(CMAKE_PROJECT_HOMEPAGE_URL https://www.unidata.ucar.edu/software/udunits)
SET(VERSION_MINOR 2)
SET(VERSION_PATCH 26) # Specify the C standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ".." CACHE PATH "..." FORCE) set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/.." CACHE PATH
"Installation root directory" FORCE)
endif() endif()
# Ensure a path in the format common to both Unix and MinGW. # Ensure a path in the format common to both Unix and MinGW.
FUNCTION(to_common_path input result) FUNCTION(to_common_path input result)
FILE(TO_NATIVE_PATH ${input} tmp) FILE(TO_NATIVE_PATH ${input} tmp)
STRING(REGEX REPLACE "^(.):" "/\\1" tmp ${tmp}) STRING(REGEX REPLACE "^(.):" "/\\1" tmp ${tmp})
SET(${result} ${tmp} PARENT_SCOPE) SET(${result} ${tmp} PARENT_SCOPE)
ENDFUNCTION(to_common_path) ENDFUNCTION(to_common_path)
# Build a shared library by default
INCLUDE(GenerateExportHeader) INCLUDE(GenerateExportHeader)
OPTION(BUILD_SHARED_LIBS "Whether or not to build a shared library" ON) option(BUILD_SHARED_LIBS "Build a shared library" ON)
IF(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
ENDIF() IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_BUILD_RPATH "$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_BUILD_RPATH "@executable_path/../../lib")
set(CMAKE_INSTALL_RPATH "@executable_path/../../lib")
ELSE()
MESSAGE(WARNING "Relocatable binary distribution is not supported for "
"O/S \"${CMAKE_SYSTEM_NAME}\"")
ENDIF()
endif()
# A little bit of Windows/Visual Studio housekeeping. # A little bit of Windows/Visual Studio housekeeping.
IF(MSVC) IF(MSVC)
# Set a property used with Visual Studio # Set a property used with Visual Studio
SET(GLOBAL PROPERTY USE_FOLDERS ON) SET(GLOBAL PROPERTY USE_FOLDERS ON)
# Suppress CRT warnings. # Suppress CRT warnings.
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
OPTION(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS}) OPTION(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS})
MESSAGE(STATUS "Building Windows DLL: ${ENABLE_DLL}") MESSAGE(STATUS "Building Windows DLL: ${ENABLE_DLL}")
IF(ENABLE_DLL) IF(ENABLE_DLL)
SET(BUILD_DLL ON CACHE BOOL "") SET(BUILD_DLL ON CACHE BOOL "")
ADD_DEFINITIONS(-DDLL_UDUNITS2) ADD_DEFINITIONS(-DDLL_UDUNITS2)
ADD_DEFINITIONS(-DDLL_EXPORT) ADD_DEFINITIONS(-DDLL_EXPORT)
ENDIF() ENDIF()
ENDIF() ENDIF()
##
# Configuration for post-install RPath
# Adapted from http://www.cmake.org/Wiki/CMake_RPATH_handling
##
IF(NOT MSVC)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif(APPLE)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing,
# but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${
CMAKE_INSTALL_LIBDIR}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
ENDIF()
##
# End configuration for post-install RPath
##
### ###
# Fix to make sure we don't try to include unistd.h # Fix to make sure we don't try to include unistd.h
# when using Visual Studio. # when using Visual Studio.
### ###
INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
IF(NOT HAVE_UNISTD_H) IF(NOT HAVE_UNISTD_H)
SET(YY_NO_UNISTD_H TRUE) SET(YY_NO_UNISTD_H TRUE)
ENDIF() ENDIF()
skipping to change at line 115 skipping to change at line 95
# Replace '\' with '\\' on Windows. # Replace '\' with '\\' on Windows.
IF(MSVC) IF(MSVC)
STRING(REPLACE "\\" "\\\\" tmp "${tmp}") STRING(REPLACE "\\" "\\\\" tmp "${tmp}")
ENDIF(MSVC) ENDIF(MSVC)
SET(DEFAULT_UDUNITS2_XML_PATH "${tmp}") SET(DEFAULT_UDUNITS2_XML_PATH "${tmp}")
MESSAGE("DEFAULT_UDUNITS2_XML_PATH = \"${DEFAULT_UDUNITS2_XML_PATH}\"") MESSAGE("DEFAULT_UDUNITS2_XML_PATH = \"${DEFAULT_UDUNITS2_XML_PATH}\"")
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
INCLUDE(CTest) INCLUDE(CTest)
enable_testing()
# The following fails on Gilda: # The following fails on Gilda:
#INCLUDE(GNUInstallDirs) #INCLUDE(GNUInstallDirs)
# Hence: # Hence:
SET(CMAKE_INSTALL_INFODIR share/info) SET(CMAKE_INSTALL_INFODIR share/info)
SET(CMAKE_INSTALL_DOCDIR share/doc/udunits) SET(CMAKE_INSTALL_DOCDIR share/doc/udunits)
to_common_path(${CMAKE_SOURCE_DIR} common_source_dir) to_common_path(${CMAKE_SOURCE_DIR} common_source_dir)
to_common_path(${CMAKE_INSTALL_INFODIR} common_install_infodir) to_common_path(${CMAKE_INSTALL_INFODIR} common_install_infodir)
# Determines if the top-level info(1)-file, "dir", should be modified. # Determines if the top-level info(1)-file, "dir", should be modified.
skipping to change at line 243 skipping to change at line 225
IF(BUILD_DLL) IF(BUILD_DLL)
REMOVE_DEFINITIONS(-DDLL_EXPORT) REMOVE_DEFINITIONS(-DDLL_EXPORT)
ENDIF() ENDIF()
ADD_SUBDIRECTORY (prog) ADD_SUBDIRECTORY (prog)
# The documentation is in texinfo(5) format # The documentation is in texinfo(5) format
texi_doc(udunits2.texi version.texi COPYRIGHT) texi_doc(udunits2.texi version.texi COPYRIGHT)
# Install CHANGE_LOG and COPYRIGHT # Install CHANGE_LOG and COPYRIGHT
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CHANGE_LOG" DESTINATION install(FILES "${CMAKE_SOURCE_DIR}/CHANGE_LOG" DESTINATION
${CMAKE_INSTALL_DOCDIR}) ${CMAKE_INSTALL_DOCDIR})
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT" DESTINATION install(FILES "${CMAKE_SOURCE_DIR}/COPYRIGHT" DESTINATION
${CMAKE_INSTALL_DOCDIR}) ${CMAKE_INSTALL_DOCDIR})
# Test the installation # Test the installation
SET(util "${CMAKE_INSTALL_PREFIX}/bin/udunits2") SET(util "${CMAKE_INSTALL_PREFIX}/bin/udunits2")
IF(WIN32) IF(WIN32)
STRING(REGEX REPLACE "/" "\\\\" util "${util}") STRING(REGEX REPLACE "/" "\\\\" util "${util}")
ENDIF() ENDIF()
#MESSAGE("util = \"${util}\"") #MESSAGE("util = \"${util}\"")
ADD_CUSTOM_TARGET(install_test "${util}" -A -H km -W m ADD_CUSTOM_TARGET(install_test "${util}" -A -H km -W m
COMMENT "Checking installation...") COMMENT "Checking installation...")
skipping to change at line 275 skipping to change at line 257
"${CPACK_PACKAGE_INSTALL_DIRECTORY}") "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} UDUNITS-2") SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} UDUNITS-2")
SET(CPACK_NSIS_HELP_LINK "http://www.unidata.ucar.edu/software/udunits") SET(CPACK_NSIS_HELP_LINK "http://www.unidata.ucar.edu/software/udunits")
SET(CPACK_NSIS_MODIFY_PATH ON) SET(CPACK_NSIS_MODIFY_PATH ON)
SET(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_NSIS_HELP_LINK}") SET(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_NSIS_HELP_LINK}")
# # There is a bug in NSI that does not handle full unix paths properly. Make # # There is a bug in NSI that does not handle full unix paths properly. Make
# # sure there is at least one set of four (4) backslashes. # # sure there is at least one set of four (4) backslashes.
# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon .bmp") # SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon .bmp")
# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe") # SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
ENDIF() ENDIF()
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "expat, libexpat-dev") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "expat, libexpat-dev")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CMAKE_HOST_SYSTEM_PROCESSOR}")
SET(CPACK_RPM_PACKAGE_REQUIRES "expat, expat-devel")
SET(CPACK_RPM_PACKAGE_PROVIDES "udunits2(1), libudunits2, udunits2.h, converter.
h")
SET(CPACK_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_HOST_SYSTEM_PROC
ESSOR}")
SET(CPACK_PACKAGE_CONTACT "support-udunits@unidata.ucar.edu") SET(CPACK_PACKAGE_CONTACT "support-udunits@unidata.ucar.edu")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Units of physical quantities C library an SET(CPACK_PACKAGE_EXECUTABLES "udunits2")
d utility")
SET(CPACK_PACKAGE_EXECUTABLES "udunits2;udunits2")
SET(CPACK_PACKAGE_VENDOR "University Corporation for Atmospheric Research") SET(CPACK_PACKAGE_VENDOR "University Corporation for Atmospheric Research")
SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYRIGHT")
SET(CPACK_PACKAGE_RELOCATABLE "ON") SET(CPACK_PACKAGE_RELOCATABLE "ON")
SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP") SET(CPACK_GENERATOR "RPM;DEB")
SET(CPACK_SOURCE_IGNORE_FILES # The following causes cpack(1) to fail
"${CPACK_SOURCE_IGNORE_FILES};config\\\\.h$;/xmlFailures/;/xmlSuccesses/;/m4
/;/\\\\.gradle/;\\\\.git;Makefile$")
SET(CPACK_SOURCE_IGNORE_FILES
"${CPACK_SOURCE_IGNORE_FILES};Makefile\\\\.in;\\\\.log$;config\\\\.status;\\
\\.cproject;\\\\.project")
SET(CPACK_SOURCE_IGNORE_FILES
"${CPACK_SOURCE_IGNORE_FILES};/autom4te\\\\.cache/;/test/;/\\\\.deps/;/\\\\.
vagrant/;~$;so_locations;\\\\.swp$")
SET(CPACK_SOURCE_IGNORE_FILES
"${CPACK_SOURCE_IGNORE_FILES};\\\\.metadata/;/CMakeFiles/;/build/")
SET(CPACK_SOURCE_STRIP_FILES "")
SET(CPACK_STRIP_FILES "bin/udunits2")
INCLUDE(CPack) INCLUDE(CPack)
#include(UseRPMTools) #include(UseRPMTools)
# if(RPMTools_ADD_RPM_TARGETS("udunits")) # if(RPMTools_ADD_RPM_TARGETS("udunits"))
#endif() #endif()
 End of changes. 16 change blocks. 
71 lines changed or deleted 44 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)