From d68054678282c2aea509bd700aa5a4af4173827d Mon Sep 17 00:00:00 2001 From: mwtoews Date: Mon, 26 Mar 2018 07:59:07 +1300 Subject: Rename CMake infrastructure to remove 4 --- CMakeLists.txt | 36 ++-- cmake/Makefile.am | 14 +- cmake/Proj4Config.cmake | 42 ---- cmake/Proj4InstallPath.cmake | 83 -------- cmake/Proj4Mac.cmake | 23 --- cmake/Proj4SystemInfo.cmake | 89 --------- cmake/Proj4Test.cmake | 45 ----- cmake/Proj4Utilities.cmake | 456 ------------------------------------------- cmake/Proj4Version.cmake | 47 ----- cmake/ProjConfig.cmake | 42 ++++ cmake/ProjInstallPath.cmake | 83 ++++++++ cmake/ProjMac.cmake | 23 +++ cmake/ProjSystemInfo.cmake | 89 +++++++++ cmake/ProjTest.cmake | 45 +++++ cmake/ProjUtilities.cmake | 456 +++++++++++++++++++++++++++++++++++++++++++ cmake/ProjVersion.cmake | 46 +++++ 16 files changed, 809 insertions(+), 810 deletions(-) delete mode 100644 cmake/Proj4Config.cmake delete mode 100644 cmake/Proj4InstallPath.cmake delete mode 100644 cmake/Proj4Mac.cmake delete mode 100644 cmake/Proj4SystemInfo.cmake delete mode 100644 cmake/Proj4Test.cmake delete mode 100644 cmake/Proj4Utilities.cmake delete mode 100644 cmake/Proj4Version.cmake create mode 100644 cmake/ProjConfig.cmake create mode 100644 cmake/ProjInstallPath.cmake create mode 100644 cmake/ProjMac.cmake create mode 100644 cmake/ProjSystemInfo.cmake create mode 100644 cmake/ProjTest.cmake create mode 100644 cmake/ProjUtilities.cmake create mode 100644 cmake/ProjVersion.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ca82d4..de541065 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################# # -# This file is part of CMake configuration for PROJ4 library (inspired from SOCI +# This file is part of CMake configuration for PROJ library (inspired from SOCI # CMake, Copyright (C) 2009-2010 Mateusz Loskot ) # # Copyright (C) 2011 Nicolas David @@ -11,8 +11,8 @@ ################################################################################# cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) -# proj4 is an ANSI C project -project(PROJ4 C) +# proj is an ANSI C project +project(PROJ C) set(PROJECT_INTERN_NAME PROJ) if (NOT CMAKE_VERSION VERSION_LESS 3.1) @@ -48,13 +48,13 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Intel") endif () ################################################################################# -# PROJ4 CMake modules +# PROJ CMake modules ################################################################################# # Path to additional CMake modules -set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) +set(CMAKE_MODULE_PATH ${PROJ_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +set(CMAKE_MODULE_PATH ${PROJ_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) -include(Proj4Utilities) +include(ProjUtilities) message(STATUS "") colormsg(_HIBLUE_ "Configuring PROJ:") @@ -62,7 +62,7 @@ colormsg(_HIBLUE_ "Configuring PROJ:") ################################################################################# #PROJ version information ################################################################################# -include(Proj4Version) +include(ProjVersion) proj_version(MAJOR 5 MINOR 0 PATCH 0) set(PROJ_API_VERSION "13") set(PROJ_BUILD_VERSION "13.0.1") @@ -70,9 +70,9 @@ set(PROJ_BUILD_VERSION "13.0.1") ################################################################################# # Build features and variants ################################################################################# -include(Proj4SystemInfo) -include(Proj4Config) -include(Proj4Mac) +include(ProjSystemInfo) +include(ProjConfig) +include(ProjMac) include(policies) ################################################################################# @@ -126,13 +126,13 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES) set (CMAKE_DEBUG_POSTFIX _d) endif () -option(PROJ4_TESTS "Enable build of collection of PROJ4 tests" ON) -boost_report_value(PROJ4_TESTS) -if(PROJ4_TESTS) +option(PROJ_TESTS "Enable build of collection of PROJ tests" ON) +boost_report_value(PROJ_TESTS) +if(PROJ_TESTS) include(CTest) enable_testing() -endif(PROJ4_TESTS) -include(Proj4Test) +endif(PROJ_TESTS) +include(ProjTest) # Put the libraries and binaries that get built into directories at the # top of the build tree rather than in hard-to-find leaf @@ -146,7 +146,7 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) ################################################################################# # Installation ################################################################################# -include(Proj4InstallPath) +include(ProjInstallPath) set(BINDIR "${DEFAULT_BINDIR}" CACHE PATH "The directory to install binaries into.") set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries into.") set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.") @@ -157,7 +157,7 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" CACHE PATH "The directory to install cm ################################################################################# # Build configured components ################################################################################# -include_directories(${PROJ4_SOURCE_DIR}/src) +include_directories(${PROJ_SOURCE_DIR}/src) message(STATUS "") add_subdirectory(nad) diff --git a/cmake/Makefile.am b/cmake/Makefile.am index 4cf5fc7e..14ce7af6 100644 --- a/cmake/Makefile.am +++ b/cmake/Makefile.am @@ -1,12 +1,12 @@ EXTRA_DIST = CMakeLists.txt \ - Proj4InstallPath.cmake \ - Proj4SystemInfo.cmake \ - Proj4Utilities.cmake \ + ProjInstallPath.cmake \ + ProjSystemInfo.cmake \ + ProjUtilities.cmake \ proj_config.cmake.in \ - Proj4Config.cmake \ - Proj4Mac.cmake \ - Proj4Test.cmake \ - Proj4Version.cmake \ + ProjConfig.cmake \ + ProjMac.cmake \ + ProjTest.cmake \ + ProjVersion.cmake \ policies.cmake \ proj_config.cmake.in \ project-config-version.cmake.in \ diff --git a/cmake/Proj4Config.cmake b/cmake/Proj4Config.cmake deleted file mode 100644 index 2bc7cb38..00000000 --- a/cmake/Proj4Config.cmake +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# SociConfig.cmake - CMake build configuration of SOCI library -################################################################################ -# Copyright (C) 2010 Mateusz Loskot -# -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) -################################################################################ -include (CheckIncludeFiles) -include (CheckLibraryExists) -include (CheckFunctionExists) - -# check needed include file -check_include_files (dlfcn.h HAVE_DLFCN_H) -check_include_files (inttypes.h HAVE_INTTYPES_H) -check_include_files (jni.h HAVE_JNI_H) -check_include_files (memory.h HAVE_MEMORY_H) -check_include_files (stdint.h HAVE_STDINT_H) -check_include_files (stdlib.h HAVE_STDLIB_H) -check_include_files (string.h HAVE_STRING_H) -check_include_files (sys/stat.h HAVE_SYS_STAT_H) -check_include_files (sys/types.h HAVE_SYS_TYPES_H) -check_include_files (unistd.h HAVE_UNISTD_H) -check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) - -CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV) - -# check libm need on unix -check_library_exists(m ceil "" HAVE_LIBM) - -set(PACKAGE "proj") -set(PACKAGE_BUGREPORT "https://github.com/OSGeo/proj.4/issues") -set(PACKAGE_NAME "PROJ") -set(PACKAGE_STRING "PROJ ${${PROJECT_INTERN_NAME}_VERSION}") -set(PACKAGE_TARNAME "proj") -set(PACKAGE_URL "http://proj4.org") -set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}") - -configure_file(cmake/proj_config.cmake.in src/proj_config.h) - - diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake deleted file mode 100644 index b06777f4..00000000 --- a/cmake/Proj4InstallPath.cmake +++ /dev/null @@ -1,83 +0,0 @@ -#---------------------------------------------- -# installation path settings -#---------------------------------------------- -if(WIN32) - if(DEFINED ENV{OSGEO4W_ROOT}) - set(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT}) - else() - set(OSGEO4W_ROOT_DIR c:/OSGeo4W) - endif() - set(DEFAULT_PROJ_ROOT_DIR ${OSGEO4W_ROOT_DIR}) -endif() -if(UNIX) - set(DEFAULT_PROJ_ROOT_DIR "/usr/local/") -endif(UNIX) - - -IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH "Proj.4 install - prefix" FORCE) -ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - -#TODO -# for data install testing the PROJ_LIB envVar - -string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) -if(WIN32) - set(DEFAULT_BIN_SUBDIR bin) - set(DEFAULT_LIB_SUBDIR local/lib) - set(DEFAULT_DATA_SUBDIR share) - set(DEFAULT_INCLUDE_SUBDIR local/include) - set(DEFAULT_DOC_SUBDIR share/doc/proj) - set(DEFAULT_CMAKE_SUBDIR local/lib/cmake/${PROJECT_NAME_LOWER}) -elseif(UNIX) - include(GNUInstallDirs) - set(DEFAULT_BIN_SUBDIR ${CMAKE_INSTALL_BINDIR}) - set(DEFAULT_LIB_SUBDIR ${CMAKE_INSTALL_LIBDIR}) - set(DEFAULT_DATA_SUBDIR ${CMAKE_INSTALL_DATAROOTDIR}/proj) - set(DEFAULT_INCLUDE_SUBDIR ${CMAKE_INSTALL_INCLUDEDIR}) - set(DEFAULT_DOC_SUBDIR ${CMAKE_INSTALL_DOCDIR}) - set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}) -else() - # Common locatoins for Unix and Mac OS X - set(DEFAULT_BIN_SUBDIR bin) - set(DEFAULT_LIB_SUBDIR lib) - set(DEFAULT_DATA_SUBDIR share/proj) - set(DEFAULT_DOC_SUBDIR doc/proj) - set(DEFAULT_INCLUDE_SUBDIR include) - set(DEFAULT_DOC_SUBDIR share/doc/proj) - set(DEFAULT_CMAKE_SUBDIR lib/cmake/${PROJECT_NAME_LOWER}) -endif() - -# Locations are changeable by user to customize layout of Proj.4 installation -# (default values are platform-specific) -set(PROJ_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING - "Subdirectory where executables will be installed") -set(PROJ_LIB_SUBDIR ${DEFAULT_LIB_SUBDIR} CACHE STRING - "Subdirectory where libraries will be installed") -set(PROJ_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING - "Subdirectory where header files will be installed") -set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") -set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING - "Subdirectory where doc will be installed") -set(PROJ_CMAKE_SUBDIR ${DEFAULT_CMAKE_SUBDIR} CACHE STRING - "Subdirectory where cmake proj4-config file will be installed") - -# Mark *DIR variables as advanced and dedicated to use by power-users only. -mark_as_advanced(PROJ_ROOT_DIR - PROJ_BIN_SUBDIR - PROJ_LIB_SUBDIR - PROJ_INCLUDE_SUBDIR - PROJ_DATA_SUBDIR - PROJ_DOC_SUBDIR - PROJ_CMAKE_SUBDIR ) - -set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") -set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") -set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") -set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") -set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") -set(DEFAULT_CMAKEDIR "${PROJ_CMAKE_SUBDIR}") - - diff --git a/cmake/Proj4Mac.cmake b/cmake/Proj4Mac.cmake deleted file mode 100644 index 9032d056..00000000 --- a/cmake/Proj4Mac.cmake +++ /dev/null @@ -1,23 +0,0 @@ -if(APPLE) -set(FRAMEWORKDIR "Library/Frameworks" CACHE PATH "the path to install framework") - set(BUNDLEDIR "Applications/OSGEO" CACHE PATH "the path to install bundle") - file(RELATIVE_PATH BUNDLE_FRAME_REL_PATH_AAA "/${FRAMEWORKDIR}" "/aaa") - string(LENGTH ${BUNDLE_FRAME_REL_PATH_AAA} AAA_LENGTH) - math(EXPR RELATIVE_PATH_LENGTH "${AAA_LENGTH}-4") - string(SUBSTRING ${BUNDLE_FRAME_REL_PATH_AAA} 0 ${RELATIVE_PATH_LENGTH} BUNDLE_FRAME_REL_PATH) - set(PROJ_INSTALL_NAME_DIR "@executable_path/${BUNDLE_FRAME_REL_PATH}/${FRAMEWORKDIR}" ) -else(APPLE) - set(FRAMEWORKDIR "") - set(BUNDLEDIR "") - set(PROJ_INSTALL_NAME_DIR "") -endif(APPLE) - -set(PROJ_RESOURCES "" ) - -if(APPLE) - option(BUILD_FRAMEWORKS_AND_BUNDLE "if set to ON, build a library framework and application bundle, otherwise install classical UNIX bin/lib" OFF ) - set(DEFAULT_BINDIR ${BUNDLEDIR}) - boost_report_value(BUNDLEDIR) - boost_report_value(PROJ_INSTALL_NAME_DIR) - boost_report_value(FRAMEWORKDIR) -endif(APPLE) diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake deleted file mode 100644 index fda57edb..00000000 --- a/cmake/Proj4SystemInfo.cmake +++ /dev/null @@ -1,89 +0,0 @@ -################################################################################ -# SociSystemInfo.cmake - part of CMake configuration of Proj.4 library -# -# Based on idea taken from http://code.google.com/p/softart/ project -################################################################################ -# Copyright (C) 2010 Mateusz Loskot -# -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) -################################################################################ -# The following variables are defined: -# PROJ_COMPILER_NAME - name of compiler toolset, follows Boost toolset naming. -# PROJ_PLATFORM_NAME - target platform name: x64, x86 or win32 -################################################################################ - -set(PROJ_COMPILER_NAME) -set(PROJ_PLATFORM_NAME) - -if(MINGW OR UNIX) - exec_program(gcc ARGS -dumpversion OUTPUT_VARIABLE GCC_VERSION) - string(REPLACE "." "" GCC_VERSION_STR_FULL ${GCC_VERSION}) - string(REGEX MATCH "[0-9]+\\.[0-9]+" GCC_VERSION_MAJOR_MINOR ${GCC_VERSION}) -endif() - -if(WIN32) - # Compilers, taken from http://predef.sourceforge.net/precomp.html#sec34 - if(MSVC) - if(MSVC_VERSION EQUAL 1200) - set(PROJ_COMPILER_NAME "msvc-6.0") - endif() - if(MSVC_VERSION EQUAL 1300) - set(PROJ_COMPILER_NAME "msvc-7.0") - endif() - if(MSVC_VERSION EQUAL 1310) - set(PROJ_COMPILER_NAME "msvc-7.1") #Visual Studio 2003 - endif() - if(MSVC_VERSION EQUAL 1400) - set(PROJ_COMPILER_NAME "msvc-8.0") #Visual Studio 2005 - endif() - if(MSVC_VERSION EQUAL 1500) - set(PROJ_COMPILER_NAME "msvc-9.0") #Visual Studio 2008 - endif() - if(MSVC_VERSION EQUAL 1600) - set(PROJ_COMPILER_NAME "msvc-10.0") #Visual Studio 2010 - endif() - if(MSVC_VERSION EQUAL 1700) - set(PROJ_COMPILER_NAME "msvc-11.0") #Visual Studio 2012 - endif() - if(MSVC_VERSION EQUAL 1800) - set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 - endif() - if(MSVC_VERSION EQUAL 1900) # CMake 3.1+ - set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015 - endif() - if(MSVC_VERSION GREATER 1900 AND MSVC_VERSION LESS 1920) # CMake 3.8+ - set(PROJ_COMPILER_NAME "msvc-14.1") #Visual Studio 2017 - endif() - endif(MSVC) - - if(MINGW) - set(PROJ_COMPILER_NAME "mingw-${GCC_VERSION}") - endif( MINGW ) - - if(CMAKE_GENERATOR MATCHES "Win64") - set(PROJ_PLATFORM_NAME "x64") - else() - set(PROJ_PLATFORM_NAME "win32") - endif() -endif(WIN32) - -if(UNIX) - set(PROJ_COMPILER_NAME "gcc-${GCC_VERSION}") - if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") - set(PROJ_PLATFORM_NAME "x64") - else() - set(PROJ_PLATFORM_NAME "x86") - endif() -endif(UNIX) - -if(NOT PROJ_COMPILER_NAME) - colormsg(_RED_ "WARNING:") - colormsg(RED "Could not determine compiler toolset name to set PROJ_COMPILER_NAME variable.") -endif() - -if(NOT PROJ_COMPILER_NAME) - colormsg(_RED_ "WARNING:") - colormsg(RED "Could not determine platform name to set PROJ_COMPILER_NAME variable.") -endif() diff --git a/cmake/Proj4Test.cmake b/cmake/Proj4Test.cmake deleted file mode 100644 index ec56afd2..00000000 --- a/cmake/Proj4Test.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# -# add test with sh script -# - -function(proj_add_test_script_sh SH_NAME BIN_USE) - if(UNIX) - get_filename_component(testname ${SH_NAME} NAME_WE) - - set(TEST_OK 1) - if(ARGV2) - set(TEST_OK 0) - set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/nad/${ARGV2}) - if(EXISTS ${GRID_FULLNAME}) - set(TEST_OK 1) - endif(EXISTS ${GRID_FULLNAME}) - endif(ARGV2) - - if( CMAKE_VERSION VERSION_LESS 2.8.4 ) - set(TEST_OK 0) - message(STATUS "test with bash script need a cmake version >= 2.8.4") - endif() - - if(${TEST_OK}) - add_test( NAME "${testname}" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad - COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} - ) - endif(${TEST_OK}) - - endif(UNIX) -endfunction() - - -function(proj_add_gie_test TESTNAME TESTCASE) - - set(GIE_BIN "gie") - set(TESTFILE ${CMAKE_SOURCE_DIR}/test/${TESTCASE}) - add_test( NAME ${TESTNAME} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN} - ${TESTFILE} - ) - -endfunction() diff --git a/cmake/Proj4Utilities.cmake b/cmake/Proj4Utilities.cmake deleted file mode 100644 index 24b61701..00000000 --- a/cmake/Proj4Utilities.cmake +++ /dev/null @@ -1,456 +0,0 @@ -################################################################################ -# SociUtilities.cmake - part of CMake configuration of Proj4 library -# -# Based on BoostUtilities.cmake from CMake configuration for Boost -################################################################################ -# Copyright (C) 2007 Douglas Gregor -# Copyright (C) 2007 Troy Straszheim -# Copyright (C) 2010 Mateusz Loskot -# -# Distributed under the Boost Software License, Version 1.0. -# See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt -################################################################################ -# Macros in this module: -# -# list_contains: Determine whether a string value is in a list. -# -# car: Return the first element in a list -# -# cdr: Return all but the first element in a list -# -# parse_arguments: Parse keyword arguments for use in other macros. -# -# proj_report_directory_property -# -# proj_target_output_name: -# -################################################################################ - -# This utility macro determines whether a particular string value -# occurs within a list of strings: -# -# list_contains(result string_to_find arg1 arg2 arg3 ... argn) -# -# This macro sets the variable named by result equal to TRUE if -# string_to_find is found anywhere in the following arguments. -macro(list_contains var value) - set(${var}) - foreach (value2 ${ARGN}) - if (${value} STREQUAL ${value2}) - set(${var} TRUE) - endif (${value} STREQUAL ${value2}) - endforeach (value2) -endmacro(list_contains) - -# This utility macro extracts the first argument from the list of -# arguments given, and places it into the variable named var. -# -# car(var arg1 arg2 ...) -macro(car var) - set(${var} ${ARGV1}) -endmacro(car) - -# This utility macro extracts all of the arguments given except the -# first, and places them into the variable named var. -# -# car(var arg1 arg2 ...) -macro(cdr var junk) - set(${var} ${ARGN}) -endmacro(cdr) - -# The parse_arguments macro will take the arguments of another macro and -# define several variables. The first argument to parse_arguments is a -# prefix to put on all variables it creates. The second argument is a -# list of names, and the third argument is a list of options. Both of -# these lists should be quoted. The rest of parse_arguments are -# arguments from another macro to be parsed. -# -# parse_arguments(prefix arg_names options arg1 arg2...) -# -# For each item in options, parse_arguments will create a variable with -# that name, prefixed with prefix_. So, for example, if prefix is -# MY_MACRO and options is OPTION1;OPTION2, then parse_arguments will -# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These -# variables will be set to true if the option exists in the command line -# or false otherwise. -# -# For each item in arg_names, parse_arguments will create a variable -# with that name, prefixed with prefix_. Each variable will be filled -# with the arguments that occur after the given arg_name is encountered -# up to the next arg_name or the end of the arguments. All options are -# removed from these lists. parse_arguments also creates a -# prefix_DEFAULT_ARGS variable containing the list of all arguments up -# to the first arg_name encountered. -macro(parse_arguments prefix arg_names option_names) - set(DEFAULT_ARGS) - foreach(arg_name ${arg_names}) - set(${prefix}_${arg_name}) - endforeach(arg_name) - foreach(option ${option_names}) - set(${prefix}_${option} FALSE) - endforeach(option) - - set(current_arg_name DEFAULT_ARGS) - set(current_arg_list) - foreach(arg ${ARGN}) - list_contains(is_arg_name ${arg} ${arg_names}) - if (is_arg_name) - set(${prefix}_${current_arg_name} ${current_arg_list}) - set(current_arg_name ${arg}) - set(current_arg_list) - else (is_arg_name) - list_contains(is_option ${arg} ${option_names}) - if (is_option) - set(${prefix}_${arg} TRUE) - else (is_option) - set(current_arg_list ${current_arg_list} ${arg}) - endif (is_option) - endif (is_arg_name) - endforeach(arg) - set(${prefix}_${current_arg_name} ${current_arg_list}) -endmacro(parse_arguments) - -# Perform a reverse topological sort on the given LIST. -# -# topological_sort(my_list "MY_" "_EDGES") -# -# LIST is the name of a variable containing a list of elements to be -# sorted in reverse topological order. Each element in the list has a -# set of outgoing edges (for example, those other list elements that -# it depends on). In the resulting reverse topological ordering -# (written back into the variable named LIST), an element will come -# later in the list than any of the elements that can be reached by -# following its outgoing edges and the outgoing edges of any vertices -# they target, recursively. Thus, if the edges represent dependencies -# on build targets, for example, the reverse topological ordering is -# the order in which one would build those targets. -# -# For each element E in this list, the edges for E are contained in -# the variable named ${PREFIX}${E}${SUFFIX}, where E is the -# upper-cased version of the element in the list. If no such variable -# exists, then it is assumed that there are no edges. For example, if -# my_list contains a, b, and c, one could provide a dependency graph -# using the following variables: -# -# MY_A_EDGES b -# MY_B_EDGES -# MY_C_EDGES a b -# -# With the involcation of topological_sort shown above and these -# variables, the resulting reverse topological ordering will be b, a, -# c. -function(topological_sort LIST PREFIX SUFFIX) - # Clear the stack and output variable - set(VERTICES "${${LIST}}") - set(STACK) - set(${LIST}) - - # Loop over all of the vertices, starting the topological sort from - # each one. - foreach(VERTEX ${VERTICES}) - string(TOUPPER ${VERTEX} UPPER_VERTEX) - - # If we haven't already processed this vertex, start a depth-first - # search from where. - if (NOT FOUND_${UPPER_VERTEX}) - # Push this vertex onto the stack with all of its outgoing edges - string(REPLACE ";" " " NEW_ELEMENT - "${VERTEX};${${PREFIX}${UPPER_VERTEX}${SUFFIX}}") - list(APPEND STACK ${NEW_ELEMENT}) - - # We've now seen this vertex - set(FOUND_${UPPER_VERTEX} TRUE) - - # While the depth-first search stack is not empty - list(LENGTH STACK STACK_LENGTH) - while(STACK_LENGTH GREATER 0) - # Remove the vertex and its remaining out-edges from the top - # of the stack - list(GET STACK -1 OUT_EDGES) - list(REMOVE_AT STACK -1) - - # Get the source vertex and the list of out-edges - separate_arguments(OUT_EDGES) - list(GET OUT_EDGES 0 SOURCE) - list(REMOVE_AT OUT_EDGES 0) - - # While there are still out-edges remaining - list(LENGTH OUT_EDGES OUT_DEGREE) - while (OUT_DEGREE GREATER 0) - # Pull off the first outgoing edge - list(GET OUT_EDGES 0 TARGET) - list(REMOVE_AT OUT_EDGES 0) - - string(TOUPPER ${TARGET} UPPER_TARGET) - if (NOT FOUND_${UPPER_TARGET}) - # We have not seen the target before, so we will traverse - # its outgoing edges before coming back to our - # source. This is the key to the depth-first traversal. - - # We've now seen this vertex - set(FOUND_${UPPER_TARGET} TRUE) - - # Push the remaining edges for the current vertex onto the - # stack - string(REPLACE ";" " " NEW_ELEMENT - "${SOURCE};${OUT_EDGES}") - list(APPEND STACK ${NEW_ELEMENT}) - - # Setup the new source and outgoing edges - set(SOURCE ${TARGET}) - string(TOUPPER ${SOURCE} UPPER_SOURCE) - set(OUT_EDGES - ${${PREFIX}${UPPER_SOURCE}${SUFFIX}}) - endif(NOT FOUND_${UPPER_TARGET}) - - list(LENGTH OUT_EDGES OUT_DEGREE) - endwhile (OUT_DEGREE GREATER 0) - - # We have finished all of the outgoing edges for - # SOURCE; add it to the resulting list. - list(APPEND ${LIST} ${SOURCE}) - - # Check the length of the stack - list(LENGTH STACK STACK_LENGTH) - endwhile(STACK_LENGTH GREATER 0) - endif (NOT FOUND_${UPPER_VERTEX}) - endforeach(VERTEX) - - set(${LIST} ${${LIST}} PARENT_SCOPE) -endfunction(topological_sort) - -# Small little hack that tweaks a component name (as used for CPack) -# to make sure to avoid certain names that cause problems. Sets the -# variable named varname to the "sanitized" name. -# -# FIXME: This is a complete hack. We probably need to fix the CPack -# generators (NSIS in particular) to get rid of the need for this. -macro(fix_cpack_component_name varname name) - if (${name} STREQUAL "foreach") - set(${varname} "boost_foreach") - else() - set(${varname} ${name}) - endif() -endmacro() - - -# -# A big shout out to the cmake gurus @ compiz -# - -function (colormsg) - string (ASCII 27 _escape) - set(WHITE "29") - set(GRAY "30") - set(RED "31") - set(GREEN "32") - set(YELLOW "33") - set(BLUE "34") - set(MAG "35") - set(CYAN "36") - - foreach (color WHITE GRAY RED GREEN YELLOW BLUE MAG CYAN) - set(HI${color} "1\;${${color}}") - set(LO${color} "2\;${${color}}") - set(_${color}_ "4\;${${color}}") - set(_HI${color}_ "1\;4\;${${color}}") - set(_LO${color}_ "2\;4\;${${color}}") - endforeach() - - set(str "") - set(coloron FALSE) - foreach(arg ${ARGV}) - if (NOT ${${arg}} STREQUAL "") - if (CMAKE_COLOR_MAKEFILE) - set(str "${str}${_escape}[${${arg}}m") - set(coloron TRUE) - endif() - else() - set(str "${str}${arg}") - if (coloron) - set(str "${str}${_escape}[0m") - set(coloron FALSE) - endif() - set(str "${str} ") - endif() - endforeach() - message(STATUS ${str}) -endfunction() - -# colormsg("Colors:" -# WHITE "white" GRAY "gray" GREEN "green" -# RED "red" YELLOW "yellow" BLUE "blue" MAG "mag" CYAN "cyan" -# _WHITE_ "white" _GRAY_ "gray" _GREEN_ "green" -# _RED_ "red" _YELLOW_ "yellow" _BLUE_ "blue" _MAG_ "mag" _CYAN_ "cyan" -# _HIWHITE_ "white" _HIGRAY_ "gray" _HIGREEN_ "green" -# _HIRED_ "red" _HIYELLOW_ "yellow" _HIBLUE_ "blue" _HIMAG_ "mag" _HICYAN_ "cyan" -# HIWHITE "white" HIGRAY "gray" HIGREEN "green" -# HIRED "red" HIYELLOW "yellow" HIBLUE "blue" HIMAG "mag" HICYAN "cyan" -# "right?") - -# -# pretty-prints the value of a variable so that the -# equals signs align -# - -function(boost_report_value NAME) - string(LENGTH "${NAME}" varlen) - # LOG - #message(STATUS "boost_report_value: NAME=${NAME} (${varlen})") - #message(STATUS "boost_report_value: \${NAME}=${${NAME}}") - math(EXPR padding_len 40-${varlen}) - string(SUBSTRING " " - 0 ${padding_len} varpadding) - colormsg("${NAME}${varpadding} = ${${NAME}}") -endfunction() - -function(trace NAME) - if(BOOST_CMAKE_TRACE) - string(LENGTH "${NAME}" varlen) - math(EXPR padding_len 40-${varlen}) - string(SUBSTRING "........................................" - 0 ${padding_len} varpadding) - message("${NAME} ${varpadding} ${${NAME}}") - endif() -endfunction() - -# -# pretty-prints the value of a variable so that the -# equals signs align -# -function(boost_report_pretty PRETTYNAME VARNAME) - string(LENGTH "${PRETTYNAME}" varlen) - math(EXPR padding_len 30-${varlen}) - string(SUBSTRING " " - 0 ${padding_len} varpadding) - message(STATUS "${PRETTYNAME}${varpadding} = ${${VARNAME}}") -endfunction() - -# -# assert that ARG is actually a library target -# - -macro(dependency_check ARG) - trace(ARG) - if (NOT "${ARG}" STREQUAL "") - get_target_property(deptype ${ARG} TYPE) - if(NOT deptype MATCHES ".*_LIBRARY$") - set(DEPENDENCY_OKAY FALSE) - list(APPEND DEPENDENCY_FAILURES ${ARG}) - endif() - endif() -endmacro() - - - -# -# Pretty-print of given property of current directory. -# -macro(proj_report_directory_property PROPNAME) - get_directory_property(${PROPNAME} ${PROPNAME}) - boost_report_value(${PROPNAME}) -endmacro() - -# -# Scans the current directory and returns a list of subdirectories. -# Author: Robert Fleming -# Source: http://www.cmake.org/pipermail/cmake/2008-February/020114.html -# -# Third parameter is 1 if you want relative paths returned. -# Usage: list_subdirectories(the_list_is_returned_here /path/to/project TRUE) -# - -macro(list_subdirectories retval curdir return_relative) - file(GLOB sub-dir RELATIVE ${curdir} *) - set(list_of_dirs "") - foreach(dir ${sub-dir}) - if(IS_DIRECTORY ${curdir}/${dir}) - if (${return_relative}) - set(list_of_dirs ${list_of_dirs} ${dir}) - else() - set(list_of_dirs ${list_of_dirs} ${curdir}/${dir}) - endif() - endif() - endforeach() - set(${retval} ${list_of_dirs}) -endmacro() - -# -# Generates output name for given target depending on platform and version. -# For instance, on Windows, libraries get ABI version suffix soci_coreXY.{dll|lib}. -# - -function(proj_target_output_name TARGET_NAME OUTPUT_NAME) - if(NOT DEFINED TARGET_NAME) - message(SEND_ERROR "Error, the variable TARGET_NAME is not defined!") - endif() - - if(NOT DEFINED ${PROJECT_INTERN_NAME}_VERSION) - message(SEND_ERROR "Error, the variable ${${PROJECT_INTERN_NAME}_VERSION} is not defined!") - endif() - - # On Windows, ABI version is specified using binary file name suffix. - # On Unix, suffix is empty and SOVERSION is used instead. - if (WIN32) - string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen) - if(abilen GREATER 0) - set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}") - endif() - endif() - - set(${OUTPUT_NAME} ${TARGET_NAME}${SUFFIX} PARENT_SCOPE) -endfunction() - - -# -# conversion from lla name to lla convert name ( without lla extension) -# - -function(proj_lla_output_name LLA_INPUT_NAME LLA_OUTPUT_NAME ) - get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE) - get_filename_component(pathname ${LLA_INPUT_NAME} PATH) - set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE) - set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE) -endfunction() - -function(proj_lla_target_name LLA_INPUT_NAME LLA_TARGET ) - get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE) - set(${LLA_TARGET} ${filename} PARENT_SCOPE) -endfunction() - -# -# in place conversion of lla file to gsb -# - -function(proj_convert_grid_lla2gsb GRID_DIRECTORY) - set(NAD2BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - set(NAD2BIN_PATH ${NAD2BIN_DIR}/nad2bin${CMAKE_EXECUTABLE_SUFFIX}) - file(TO_NATIVE_PATH ${NAD2BIN_PATH} NAD2BIN_EXE) - file(GLOB LLA_FILES ${${GRID_DIRECTORY}}/*.lla) - foreach(LLA ${LLA_FILES} ) - proj_lla_output_name(${LLA} DEST_FILE) - file(TO_NATIVE_PATH ${DEST_FILE} DEST) - proj_lla_target_name(${LLA} LLA_TARGET) - if(NOT EXISTS ${DEST}) - add_custom_target( ${LLA_TARGET} ALL - COMMAND ${NAD2BIN_EXE} ${DEST} "<" ${LLA} - DEPENDS nad2bin ) - endif(NOT EXISTS ${DEST}) - endforeach(LLA) -endfunction() - -# -# add lla output list to an existing file list -# - -function(proj_append_lla_output_file LLA_INPUT_FILE FILE_LIST) - set(LIST_OUT ${${FILE_LIST}}) - foreach(LLA ${${LLA_INPUT_FILE}} ) - proj_lla_output_name(${LLA} DEST_FILE) - file(TO_NATIVE_PATH ${DEST_FILE} DEST) - set(LIST_OUT ${LIST_OUT} ${DEST_FILE} ) - endforeach(LLA ${LLA_INPUT_FILE}) - set(${FILE_LIST} ${LIST_OUT} PARENT_SCOPE) -endfunction() - diff --git a/cmake/Proj4Version.cmake b/cmake/Proj4Version.cmake deleted file mode 100644 index fafaf24d..00000000 --- a/cmake/Proj4Version.cmake +++ /dev/null @@ -1,47 +0,0 @@ -################################################################################ -# Proj4Version.cmake - part of CMake configuration of Proj4 library -################################################################################ -# Copyright (C) 2010 Mateusz Loskot -# -# Distributed under the Boost Software License, Version 1.0 -################################################################################ -# Macros in this module: -# -# proj_version - defines version information for PROJ library -# (best known as PROJ4 because MAJOR version is 4 since a very long time) -################################################################################ - -# Defines version information for PROJ library -# -# proj_version(MAJOR major_version MINOR minor_version PATCH patch_level) -# -# MAJOR.MINOR version is used to set SOVERSION -# - -macro(proj_version) - parse_arguments(THIS_VERSION "MAJOR;MINOR;PATCH;" - "" - ${ARGN}) - - # Set version components - set(${PROJECT_INTERN_NAME}_VERSION_MAJOR ${THIS_VERSION_MAJOR}) - set(${PROJECT_INTERN_NAME}_VERSION_MINOR ${THIS_VERSION_MINOR}) - set(${PROJECT_INTERN_NAME}_VERSION_PATCH ${THIS_VERSION_PATCH}) - - # Set VERSION string - set(${PROJECT_INTERN_NAME}_VERSION - "${${PROJECT_INTERN_NAME}_VERSION_MAJOR}.${${PROJECT_INTERN_NAME}_VERSION_MINOR}.${${PROJECT_INTERN_NAME}_VERSION_PATCH}") - - # Set ABI version string used to name binary output - # On Windows, ABI version is specified using binary file name suffix. - if(WIN32) - set(${PROJECT_INTERN_NAME}_ABI_VERSION - "${${PROJECT_INTERN_NAME}_VERSION_MAJOR}_${${PROJECT_INTERN_NAME}_VERSION_MINOR}") - endif() - - message(STATUS "") - boost_report_value(${PROJECT_INTERN_NAME}_VERSION) - if(WIN32) - boost_report_value(${PROJECT_INTERN_NAME}_ABI_VERSION) - endif(WIN32) -endmacro() diff --git a/cmake/ProjConfig.cmake b/cmake/ProjConfig.cmake new file mode 100644 index 00000000..3c5f110d --- /dev/null +++ b/cmake/ProjConfig.cmake @@ -0,0 +1,42 @@ +################################################################################ +# ProjConfig.cmake - CMake build configuration of PROJ library +################################################################################ +# Copyright (C) 2010 Mateusz Loskot +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +################################################################################ +include (CheckIncludeFiles) +include (CheckLibraryExists) +include (CheckFunctionExists) + +# check needed include file +check_include_files (dlfcn.h HAVE_DLFCN_H) +check_include_files (inttypes.h HAVE_INTTYPES_H) +check_include_files (jni.h HAVE_JNI_H) +check_include_files (memory.h HAVE_MEMORY_H) +check_include_files (stdint.h HAVE_STDINT_H) +check_include_files (stdlib.h HAVE_STDLIB_H) +check_include_files (string.h HAVE_STRING_H) +check_include_files (sys/stat.h HAVE_SYS_STAT_H) +check_include_files (sys/types.h HAVE_SYS_TYPES_H) +check_include_files (unistd.h HAVE_UNISTD_H) +check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) + +CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV) + +# check libm need on unix +check_library_exists(m ceil "" HAVE_LIBM) + +set(PACKAGE "proj") +set(PACKAGE_BUGREPORT "https://github.com/OSGeo/proj.4/issues") +set(PACKAGE_NAME "PROJ") +set(PACKAGE_STRING "PROJ ${${PROJECT_INTERN_NAME}_VERSION}") +set(PACKAGE_TARNAME "proj") +set(PACKAGE_URL "http://proj4.org") +set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}") + +configure_file(cmake/proj_config.cmake.in src/proj_config.h) + + diff --git a/cmake/ProjInstallPath.cmake b/cmake/ProjInstallPath.cmake new file mode 100644 index 00000000..72ffbac2 --- /dev/null +++ b/cmake/ProjInstallPath.cmake @@ -0,0 +1,83 @@ +#---------------------------------------------- +# installation path settings +#---------------------------------------------- +if(WIN32) + if(DEFINED ENV{OSGEO4W_ROOT}) + set(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT}) + else() + set(OSGEO4W_ROOT_DIR c:/OSGeo4W) + endif() + set(DEFAULT_PROJ_ROOT_DIR ${OSGEO4W_ROOT_DIR}) +endif() +if(UNIX) + set(DEFAULT_PROJ_ROOT_DIR "/usr/local/") +endif(UNIX) + + +IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH + "Proj install prefix" FORCE) +ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + +#TODO +# for data install testing the PROJ_LIB envVar + +string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) +if(WIN32) + set(DEFAULT_BIN_SUBDIR bin) + set(DEFAULT_LIB_SUBDIR local/lib) + set(DEFAULT_DATA_SUBDIR share) + set(DEFAULT_INCLUDE_SUBDIR local/include) + set(DEFAULT_DOC_SUBDIR share/doc/proj) + set(DEFAULT_CMAKE_SUBDIR local/lib/cmake/${PROJECT_NAME_LOWER}) +elseif(UNIX) + include(GNUInstallDirs) + set(DEFAULT_BIN_SUBDIR ${CMAKE_INSTALL_BINDIR}) + set(DEFAULT_LIB_SUBDIR ${CMAKE_INSTALL_LIBDIR}) + set(DEFAULT_DATA_SUBDIR ${CMAKE_INSTALL_DATAROOTDIR}/proj) + set(DEFAULT_INCLUDE_SUBDIR ${CMAKE_INSTALL_INCLUDEDIR}) + set(DEFAULT_DOC_SUBDIR ${CMAKE_INSTALL_DOCDIR}) + set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}) +else() + # Common locatoins for Unix and Mac OS X + set(DEFAULT_BIN_SUBDIR bin) + set(DEFAULT_LIB_SUBDIR lib) + set(DEFAULT_DATA_SUBDIR share/proj) + set(DEFAULT_DOC_SUBDIR doc/proj) + set(DEFAULT_INCLUDE_SUBDIR include) + set(DEFAULT_DOC_SUBDIR share/doc/proj) + set(DEFAULT_CMAKE_SUBDIR lib/cmake/${PROJECT_NAME_LOWER}) +endif() + +# Locations are changeable by user to customize layout of PROJ installation +# (default values are platform-specific) +set(PROJ_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING + "Subdirectory where executables will be installed") +set(PROJ_LIB_SUBDIR ${DEFAULT_LIB_SUBDIR} CACHE STRING + "Subdirectory where libraries will be installed") +set(PROJ_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING + "Subdirectory where header files will be installed") +set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING + "Subdirectory where data will be installed") +set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING + "Subdirectory where doc will be installed") +set(PROJ_CMAKE_SUBDIR ${DEFAULT_CMAKE_SUBDIR} CACHE STRING + "Subdirectory where cmake proj-config file will be installed") + +# Mark *DIR variables as advanced and dedicated to use by power-users only. +mark_as_advanced(PROJ_ROOT_DIR + PROJ_BIN_SUBDIR + PROJ_LIB_SUBDIR + PROJ_INCLUDE_SUBDIR + PROJ_DATA_SUBDIR + PROJ_DOC_SUBDIR + PROJ_CMAKE_SUBDIR ) + +set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") +set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") +set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") +set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") +set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") +set(DEFAULT_CMAKEDIR "${PROJ_CMAKE_SUBDIR}") + + diff --git a/cmake/ProjMac.cmake b/cmake/ProjMac.cmake new file mode 100644 index 00000000..9032d056 --- /dev/null +++ b/cmake/ProjMac.cmake @@ -0,0 +1,23 @@ +if(APPLE) +set(FRAMEWORKDIR "Library/Frameworks" CACHE PATH "the path to install framework") + set(BUNDLEDIR "Applications/OSGEO" CACHE PATH "the path to install bundle") + file(RELATIVE_PATH BUNDLE_FRAME_REL_PATH_AAA "/${FRAMEWORKDIR}" "/aaa") + string(LENGTH ${BUNDLE_FRAME_REL_PATH_AAA} AAA_LENGTH) + math(EXPR RELATIVE_PATH_LENGTH "${AAA_LENGTH}-4") + string(SUBSTRING ${BUNDLE_FRAME_REL_PATH_AAA} 0 ${RELATIVE_PATH_LENGTH} BUNDLE_FRAME_REL_PATH) + set(PROJ_INSTALL_NAME_DIR "@executable_path/${BUNDLE_FRAME_REL_PATH}/${FRAMEWORKDIR}" ) +else(APPLE) + set(FRAMEWORKDIR "") + set(BUNDLEDIR "") + set(PROJ_INSTALL_NAME_DIR "") +endif(APPLE) + +set(PROJ_RESOURCES "" ) + +if(APPLE) + option(BUILD_FRAMEWORKS_AND_BUNDLE "if set to ON, build a library framework and application bundle, otherwise install classical UNIX bin/lib" OFF ) + set(DEFAULT_BINDIR ${BUNDLEDIR}) + boost_report_value(BUNDLEDIR) + boost_report_value(PROJ_INSTALL_NAME_DIR) + boost_report_value(FRAMEWORKDIR) +endif(APPLE) diff --git a/cmake/ProjSystemInfo.cmake b/cmake/ProjSystemInfo.cmake new file mode 100644 index 00000000..2c66e268 --- /dev/null +++ b/cmake/ProjSystemInfo.cmake @@ -0,0 +1,89 @@ +################################################################################ +# ProjSystemInfo.cmake - part of CMake configuration of PROJ library +# +# Based on idea taken from http://code.google.com/p/softart/ project +################################################################################ +# Copyright (C) 2010 Mateusz Loskot +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +################################################################################ +# The following variables are defined: +# PROJ_COMPILER_NAME - name of compiler toolset, follows Boost toolset naming. +# PROJ_PLATFORM_NAME - target platform name: x64, x86 or win32 +################################################################################ + +set(PROJ_COMPILER_NAME) +set(PROJ_PLATFORM_NAME) + +if(MINGW OR UNIX) + exec_program(gcc ARGS -dumpversion OUTPUT_VARIABLE GCC_VERSION) + string(REPLACE "." "" GCC_VERSION_STR_FULL ${GCC_VERSION}) + string(REGEX MATCH "[0-9]+\\.[0-9]+" GCC_VERSION_MAJOR_MINOR ${GCC_VERSION}) +endif() + +if(WIN32) + # Compilers, taken from http://predef.sourceforge.net/precomp.html#sec34 + if(MSVC) + if(MSVC_VERSION EQUAL 1200) + set(PROJ_COMPILER_NAME "msvc-6.0") + endif() + if(MSVC_VERSION EQUAL 1300) + set(PROJ_COMPILER_NAME "msvc-7.0") + endif() + if(MSVC_VERSION EQUAL 1310) + set(PROJ_COMPILER_NAME "msvc-7.1") #Visual Studio 2003 + endif() + if(MSVC_VERSION EQUAL 1400) + set(PROJ_COMPILER_NAME "msvc-8.0") #Visual Studio 2005 + endif() + if(MSVC_VERSION EQUAL 1500) + set(PROJ_COMPILER_NAME "msvc-9.0") #Visual Studio 2008 + endif() + if(MSVC_VERSION EQUAL 1600) + set(PROJ_COMPILER_NAME "msvc-10.0") #Visual Studio 2010 + endif() + if(MSVC_VERSION EQUAL 1700) + set(PROJ_COMPILER_NAME "msvc-11.0") #Visual Studio 2012 + endif() + if(MSVC_VERSION EQUAL 1800) + set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 + endif() + if(MSVC_VERSION EQUAL 1900) # CMake 3.1+ + set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015 + endif() + if(MSVC_VERSION GREATER 1900 AND MSVC_VERSION LESS 1920) # CMake 3.8+ + set(PROJ_COMPILER_NAME "msvc-14.1") #Visual Studio 2017 + endif() + endif(MSVC) + + if(MINGW) + set(PROJ_COMPILER_NAME "mingw-${GCC_VERSION}") + endif( MINGW ) + + if(CMAKE_GENERATOR MATCHES "Win64") + set(PROJ_PLATFORM_NAME "x64") + else() + set(PROJ_PLATFORM_NAME "win32") + endif() +endif(WIN32) + +if(UNIX) + set(PROJ_COMPILER_NAME "gcc-${GCC_VERSION}") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + set(PROJ_PLATFORM_NAME "x64") + else() + set(PROJ_PLATFORM_NAME "x86") + endif() +endif(UNIX) + +if(NOT PROJ_COMPILER_NAME) + colormsg(_RED_ "WARNING:") + colormsg(RED "Could not determine compiler toolset name to set PROJ_COMPILER_NAME variable.") +endif() + +if(NOT PROJ_COMPILER_NAME) + colormsg(_RED_ "WARNING:") + colormsg(RED "Could not determine platform name to set PROJ_COMPILER_NAME variable.") +endif() diff --git a/cmake/ProjTest.cmake b/cmake/ProjTest.cmake new file mode 100644 index 00000000..ec56afd2 --- /dev/null +++ b/cmake/ProjTest.cmake @@ -0,0 +1,45 @@ +# +# add test with sh script +# + +function(proj_add_test_script_sh SH_NAME BIN_USE) + if(UNIX) + get_filename_component(testname ${SH_NAME} NAME_WE) + + set(TEST_OK 1) + if(ARGV2) + set(TEST_OK 0) + set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/nad/${ARGV2}) + if(EXISTS ${GRID_FULLNAME}) + set(TEST_OK 1) + endif(EXISTS ${GRID_FULLNAME}) + endif(ARGV2) + + if( CMAKE_VERSION VERSION_LESS 2.8.4 ) + set(TEST_OK 0) + message(STATUS "test with bash script need a cmake version >= 2.8.4") + endif() + + if(${TEST_OK}) + add_test( NAME "${testname}" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad + COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} + ) + endif(${TEST_OK}) + + endif(UNIX) +endfunction() + + +function(proj_add_gie_test TESTNAME TESTCASE) + + set(GIE_BIN "gie") + set(TESTFILE ${CMAKE_SOURCE_DIR}/test/${TESTCASE}) + add_test( NAME ${TESTNAME} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN} + ${TESTFILE} + ) + +endfunction() diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake new file mode 100644 index 00000000..bde495c6 --- /dev/null +++ b/cmake/ProjUtilities.cmake @@ -0,0 +1,456 @@ +################################################################################ +# ProjUtilities.cmake - part of CMake configuration of PROJ library +# +# Based on BoostUtilities.cmake from CMake configuration for Boost +################################################################################ +# Copyright (C) 2007 Douglas Gregor +# Copyright (C) 2007 Troy Straszheim +# Copyright (C) 2010 Mateusz Loskot +# +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt +################################################################################ +# Macros in this module: +# +# list_contains: Determine whether a string value is in a list. +# +# car: Return the first element in a list +# +# cdr: Return all but the first element in a list +# +# parse_arguments: Parse keyword arguments for use in other macros. +# +# proj_report_directory_property +# +# proj_target_output_name: +# +################################################################################ + +# This utility macro determines whether a particular string value +# occurs within a list of strings: +# +# list_contains(result string_to_find arg1 arg2 arg3 ... argn) +# +# This macro sets the variable named by result equal to TRUE if +# string_to_find is found anywhere in the following arguments. +macro(list_contains var value) + set(${var}) + foreach (value2 ${ARGN}) + if (${value} STREQUAL ${value2}) + set(${var} TRUE) + endif (${value} STREQUAL ${value2}) + endforeach (value2) +endmacro(list_contains) + +# This utility macro extracts the first argument from the list of +# arguments given, and places it into the variable named var. +# +# car(var arg1 arg2 ...) +macro(car var) + set(${var} ${ARGV1}) +endmacro(car) + +# This utility macro extracts all of the arguments given except the +# first, and places them into the variable named var. +# +# car(var arg1 arg2 ...) +macro(cdr var junk) + set(${var} ${ARGN}) +endmacro(cdr) + +# The parse_arguments macro will take the arguments of another macro and +# define several variables. The first argument to parse_arguments is a +# prefix to put on all variables it creates. The second argument is a +# list of names, and the third argument is a list of options. Both of +# these lists should be quoted. The rest of parse_arguments are +# arguments from another macro to be parsed. +# +# parse_arguments(prefix arg_names options arg1 arg2...) +# +# For each item in options, parse_arguments will create a variable with +# that name, prefixed with prefix_. So, for example, if prefix is +# MY_MACRO and options is OPTION1;OPTION2, then parse_arguments will +# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These +# variables will be set to true if the option exists in the command line +# or false otherwise. +# +# For each item in arg_names, parse_arguments will create a variable +# with that name, prefixed with prefix_. Each variable will be filled +# with the arguments that occur after the given arg_name is encountered +# up to the next arg_name or the end of the arguments. All options are +# removed from these lists. parse_arguments also creates a +# prefix_DEFAULT_ARGS variable containing the list of all arguments up +# to the first arg_name encountered. +macro(parse_arguments prefix arg_names option_names) + set(DEFAULT_ARGS) + foreach(arg_name ${arg_names}) + set(${prefix}_${arg_name}) + endforeach(arg_name) + foreach(option ${option_names}) + set(${prefix}_${option} FALSE) + endforeach(option) + + set(current_arg_name DEFAULT_ARGS) + set(current_arg_list) + foreach(arg ${ARGN}) + list_contains(is_arg_name ${arg} ${arg_names}) + if (is_arg_name) + set(${prefix}_${current_arg_name} ${current_arg_list}) + set(current_arg_name ${arg}) + set(current_arg_list) + else (is_arg_name) + list_contains(is_option ${arg} ${option_names}) + if (is_option) + set(${prefix}_${arg} TRUE) + else (is_option) + set(current_arg_list ${current_arg_list} ${arg}) + endif (is_option) + endif (is_arg_name) + endforeach(arg) + set(${prefix}_${current_arg_name} ${current_arg_list}) +endmacro(parse_arguments) + +# Perform a reverse topological sort on the given LIST. +# +# topological_sort(my_list "MY_" "_EDGES") +# +# LIST is the name of a variable containing a list of elements to be +# sorted in reverse topological order. Each element in the list has a +# set of outgoing edges (for example, those other list elements that +# it depends on). In the resulting reverse topological ordering +# (written back into the variable named LIST), an element will come +# later in the list than any of the elements that can be reached by +# following its outgoing edges and the outgoing edges of any vertices +# they target, recursively. Thus, if the edges represent dependencies +# on build targets, for example, the reverse topological ordering is +# the order in which one would build those targets. +# +# For each element E in this list, the edges for E are contained in +# the variable named ${PREFIX}${E}${SUFFIX}, where E is the +# upper-cased version of the element in the list. If no such variable +# exists, then it is assumed that there are no edges. For example, if +# my_list contains a, b, and c, one could provide a dependency graph +# using the following variables: +# +# MY_A_EDGES b +# MY_B_EDGES +# MY_C_EDGES a b +# +# With the involcation of topological_sort shown above and these +# variables, the resulting reverse topological ordering will be b, a, +# c. +function(topological_sort LIST PREFIX SUFFIX) + # Clear the stack and output variable + set(VERTICES "${${LIST}}") + set(STACK) + set(${LIST}) + + # Loop over all of the vertices, starting the topological sort from + # each one. + foreach(VERTEX ${VERTICES}) + string(TOUPPER ${VERTEX} UPPER_VERTEX) + + # If we haven't already processed this vertex, start a depth-first + # search from where. + if (NOT FOUND_${UPPER_VERTEX}) + # Push this vertex onto the stack with all of its outgoing edges + string(REPLACE ";" " " NEW_ELEMENT + "${VERTEX};${${PREFIX}${UPPER_VERTEX}${SUFFIX}}") + list(APPEND STACK ${NEW_ELEMENT}) + + # We've now seen this vertex + set(FOUND_${UPPER_VERTEX} TRUE) + + # While the depth-first search stack is not empty + list(LENGTH STACK STACK_LENGTH) + while(STACK_LENGTH GREATER 0) + # Remove the vertex and its remaining out-edges from the top + # of the stack + list(GET STACK -1 OUT_EDGES) + list(REMOVE_AT STACK -1) + + # Get the source vertex and the list of out-edges + separate_arguments(OUT_EDGES) + list(GET OUT_EDGES 0 SOURCE) + list(REMOVE_AT OUT_EDGES 0) + + # While there are still out-edges remaining + list(LENGTH OUT_EDGES OUT_DEGREE) + while (OUT_DEGREE GREATER 0) + # Pull off the first outgoing edge + list(GET OUT_EDGES 0 TARGET) + list(REMOVE_AT OUT_EDGES 0) + + string(TOUPPER ${TARGET} UPPER_TARGET) + if (NOT FOUND_${UPPER_TARGET}) + # We have not seen the target before, so we will traverse + # its outgoing edges before coming back to our + # source. This is the key to the depth-first traversal. + + # We've now seen this vertex + set(FOUND_${UPPER_TARGET} TRUE) + + # Push the remaining edges for the current vertex onto the + # stack + string(REPLACE ";" " " NEW_ELEMENT + "${SOURCE};${OUT_EDGES}") + list(APPEND STACK ${NEW_ELEMENT}) + + # Setup the new source and outgoing edges + set(SOURCE ${TARGET}) + string(TOUPPER ${SOURCE} UPPER_SOURCE) + set(OUT_EDGES + ${${PREFIX}${UPPER_SOURCE}${SUFFIX}}) + endif(NOT FOUND_${UPPER_TARGET}) + + list(LENGTH OUT_EDGES OUT_DEGREE) + endwhile (OUT_DEGREE GREATER 0) + + # We have finished all of the outgoing edges for + # SOURCE; add it to the resulting list. + list(APPEND ${LIST} ${SOURCE}) + + # Check the length of the stack + list(LENGTH STACK STACK_LENGTH) + endwhile(STACK_LENGTH GREATER 0) + endif (NOT FOUND_${UPPER_VERTEX}) + endforeach(VERTEX) + + set(${LIST} ${${LIST}} PARENT_SCOPE) +endfunction(topological_sort) + +# Small little hack that tweaks a component name (as used for CPack) +# to make sure to avoid certain names that cause problems. Sets the +# variable named varname to the "sanitized" name. +# +# FIXME: This is a complete hack. We probably need to fix the CPack +# generators (NSIS in particular) to get rid of the need for this. +macro(fix_cpack_component_name varname name) + if (${name} STREQUAL "foreach") + set(${varname} "boost_foreach") + else() + set(${varname} ${name}) + endif() +endmacro() + + +# +# A big shout out to the cmake gurus @ compiz +# + +function (colormsg) + string (ASCII 27 _escape) + set(WHITE "29") + set(GRAY "30") + set(RED "31") + set(GREEN "32") + set(YELLOW "33") + set(BLUE "34") + set(MAG "35") + set(CYAN "36") + + foreach (color WHITE GRAY RED GREEN YELLOW BLUE MAG CYAN) + set(HI${color} "1\;${${color}}") + set(LO${color} "2\;${${color}}") + set(_${color}_ "4\;${${color}}") + set(_HI${color}_ "1\;4\;${${color}}") + set(_LO${color}_ "2\;4\;${${color}}") + endforeach() + + set(str "") + set(coloron FALSE) + foreach(arg ${ARGV}) + if (NOT ${${arg}} STREQUAL "") + if (CMAKE_COLOR_MAKEFILE) + set(str "${str}${_escape}[${${arg}}m") + set(coloron TRUE) + endif() + else() + set(str "${str}${arg}") + if (coloron) + set(str "${str}${_escape}[0m") + set(coloron FALSE) + endif() + set(str "${str} ") + endif() + endforeach() + message(STATUS ${str}) +endfunction() + +# colormsg("Colors:" +# WHITE "white" GRAY "gray" GREEN "green" +# RED "red" YELLOW "yellow" BLUE "blue" MAG "mag" CYAN "cyan" +# _WHITE_ "white" _GRAY_ "gray" _GREEN_ "green" +# _RED_ "red" _YELLOW_ "yellow" _BLUE_ "blue" _MAG_ "mag" _CYAN_ "cyan" +# _HIWHITE_ "white" _HIGRAY_ "gray" _HIGREEN_ "green" +# _HIRED_ "red" _HIYELLOW_ "yellow" _HIBLUE_ "blue" _HIMAG_ "mag" _HICYAN_ "cyan" +# HIWHITE "white" HIGRAY "gray" HIGREEN "green" +# HIRED "red" HIYELLOW "yellow" HIBLUE "blue" HIMAG "mag" HICYAN "cyan" +# "right?") + +# +# pretty-prints the value of a variable so that the +# equals signs align +# + +function(boost_report_value NAME) + string(LENGTH "${NAME}" varlen) + # LOG + #message(STATUS "boost_report_value: NAME=${NAME} (${varlen})") + #message(STATUS "boost_report_value: \${NAME}=${${NAME}}") + math(EXPR padding_len 40-${varlen}) + string(SUBSTRING " " + 0 ${padding_len} varpadding) + colormsg("${NAME}${varpadding} = ${${NAME}}") +endfunction() + +function(trace NAME) + if(BOOST_CMAKE_TRACE) + string(LENGTH "${NAME}" varlen) + math(EXPR padding_len 40-${varlen}) + string(SUBSTRING "........................................" + 0 ${padding_len} varpadding) + message("${NAME} ${varpadding} ${${NAME}}") + endif() +endfunction() + +# +# pretty-prints the value of a variable so that the +# equals signs align +# +function(boost_report_pretty PRETTYNAME VARNAME) + string(LENGTH "${PRETTYNAME}" varlen) + math(EXPR padding_len 30-${varlen}) + string(SUBSTRING " " + 0 ${padding_len} varpadding) + message(STATUS "${PRETTYNAME}${varpadding} = ${${VARNAME}}") +endfunction() + +# +# assert that ARG is actually a library target +# + +macro(dependency_check ARG) + trace(ARG) + if (NOT "${ARG}" STREQUAL "") + get_target_property(deptype ${ARG} TYPE) + if(NOT deptype MATCHES ".*_LIBRARY$") + set(DEPENDENCY_OKAY FALSE) + list(APPEND DEPENDENCY_FAILURES ${ARG}) + endif() + endif() +endmacro() + + + +# +# Pretty-print of given property of current directory. +# +macro(proj_report_directory_property PROPNAME) + get_directory_property(${PROPNAME} ${PROPNAME}) + boost_report_value(${PROPNAME}) +endmacro() + +# +# Scans the current directory and returns a list of subdirectories. +# Author: Robert Fleming +# Source: http://www.cmake.org/pipermail/cmake/2008-February/020114.html +# +# Third parameter is 1 if you want relative paths returned. +# Usage: list_subdirectories(the_list_is_returned_here /path/to/project TRUE) +# + +macro(list_subdirectories retval curdir return_relative) + file(GLOB sub-dir RELATIVE ${curdir} *) + set(list_of_dirs "") + foreach(dir ${sub-dir}) + if(IS_DIRECTORY ${curdir}/${dir}) + if (${return_relative}) + set(list_of_dirs ${list_of_dirs} ${dir}) + else() + set(list_of_dirs ${list_of_dirs} ${curdir}/${dir}) + endif() + endif() + endforeach() + set(${retval} ${list_of_dirs}) +endmacro() + +# +# Generates output name for given target depending on platform and version. +# For instance, on Windows, libraries get ABI version suffix soci_coreXY.{dll|lib}. +# + +function(proj_target_output_name TARGET_NAME OUTPUT_NAME) + if(NOT DEFINED TARGET_NAME) + message(SEND_ERROR "Error, the variable TARGET_NAME is not defined!") + endif() + + if(NOT DEFINED ${PROJECT_INTERN_NAME}_VERSION) + message(SEND_ERROR "Error, the variable ${${PROJECT_INTERN_NAME}_VERSION} is not defined!") + endif() + + # On Windows, ABI version is specified using binary file name suffix. + # On Unix, suffix is empty and SOVERSION is used instead. + if (WIN32) + string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen) + if(abilen GREATER 0) + set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}") + endif() + endif() + + set(${OUTPUT_NAME} ${TARGET_NAME}${SUFFIX} PARENT_SCOPE) +endfunction() + + +# +# conversion from lla name to lla convert name ( without lla extension) +# + +function(proj_lla_output_name LLA_INPUT_NAME LLA_OUTPUT_NAME ) + get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE) + get_filename_component(pathname ${LLA_INPUT_NAME} PATH) + set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE) + set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE) +endfunction() + +function(proj_lla_target_name LLA_INPUT_NAME LLA_TARGET ) + get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE) + set(${LLA_TARGET} ${filename} PARENT_SCOPE) +endfunction() + +# +# in place conversion of lla file to gsb +# + +function(proj_convert_grid_lla2gsb GRID_DIRECTORY) + set(NAD2BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + set(NAD2BIN_PATH ${NAD2BIN_DIR}/nad2bin${CMAKE_EXECUTABLE_SUFFIX}) + file(TO_NATIVE_PATH ${NAD2BIN_PATH} NAD2BIN_EXE) + file(GLOB LLA_FILES ${${GRID_DIRECTORY}}/*.lla) + foreach(LLA ${LLA_FILES} ) + proj_lla_output_name(${LLA} DEST_FILE) + file(TO_NATIVE_PATH ${DEST_FILE} DEST) + proj_lla_target_name(${LLA} LLA_TARGET) + if(NOT EXISTS ${DEST}) + add_custom_target( ${LLA_TARGET} ALL + COMMAND ${NAD2BIN_EXE} ${DEST} "<" ${LLA} + DEPENDS nad2bin ) + endif(NOT EXISTS ${DEST}) + endforeach(LLA) +endfunction() + +# +# add lla output list to an existing file list +# + +function(proj_append_lla_output_file LLA_INPUT_FILE FILE_LIST) + set(LIST_OUT ${${FILE_LIST}}) + foreach(LLA ${${LLA_INPUT_FILE}} ) + proj_lla_output_name(${LLA} DEST_FILE) + file(TO_NATIVE_PATH ${DEST_FILE} DEST) + set(LIST_OUT ${LIST_OUT} ${DEST_FILE} ) + endforeach(LLA ${LLA_INPUT_FILE}) + set(${FILE_LIST} ${LIST_OUT} PARENT_SCOPE) +endfunction() + diff --git a/cmake/ProjVersion.cmake b/cmake/ProjVersion.cmake new file mode 100644 index 00000000..1121cd36 --- /dev/null +++ b/cmake/ProjVersion.cmake @@ -0,0 +1,46 @@ +################################################################################ +# ProjVersion.cmake - part of CMake configuration of PROJ library +################################################################################ +# Copyright (C) 2010 Mateusz Loskot +# +# Distributed under the Boost Software License, Version 1.0 +################################################################################ +# Macros in this module: +# +# proj_version - defines version information for PROJ library +################################################################################ + +# Defines version information for PROJ library +# +# proj_version(MAJOR major_version MINOR minor_version PATCH patch_level) +# +# MAJOR.MINOR version is used to set SOVERSION +# + +macro(proj_version) + parse_arguments(THIS_VERSION "MAJOR;MINOR;PATCH;" + "" + ${ARGN}) + + # Set version components + set(${PROJECT_INTERN_NAME}_VERSION_MAJOR ${THIS_VERSION_MAJOR}) + set(${PROJECT_INTERN_NAME}_VERSION_MINOR ${THIS_VERSION_MINOR}) + set(${PROJECT_INTERN_NAME}_VERSION_PATCH ${THIS_VERSION_PATCH}) + + # Set VERSION string + set(${PROJECT_INTERN_NAME}_VERSION + "${${PROJECT_INTERN_NAME}_VERSION_MAJOR}.${${PROJECT_INTERN_NAME}_VERSION_MINOR}.${${PROJECT_INTERN_NAME}_VERSION_PATCH}") + + # Set ABI version string used to name binary output + # On Windows, ABI version is specified using binary file name suffix. + if(WIN32) + set(${PROJECT_INTERN_NAME}_ABI_VERSION + "${${PROJECT_INTERN_NAME}_VERSION_MAJOR}_${${PROJECT_INTERN_NAME}_VERSION_MINOR}") + endif() + + message(STATUS "") + boost_report_value(${PROJECT_INTERN_NAME}_VERSION) + if(WIN32) + boost_report_value(${PROJECT_INTERN_NAME}_ABI_VERSION) + endif(WIN32) +endmacro() -- cgit v1.2.3