aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Karney <charles.karney@sri.com>2020-02-04 14:20:28 -0500
committerCharles Karney <charles.karney@sri.com>2020-02-04 14:20:28 -0500
commitc74781ea2710f18a9f1c9728fa5eca5d3601ad5b (patch)
tree098b6e3fde86e89d0a2daa69976769f65b576a81
parentc3e7876325e5d43586a7eee43db1df9468f90d65 (diff)
downloadPROJ-c74781ea2710f18a9f1c9728fa5eca5d3601ad5b.tar.gz
PROJ-c74781ea2710f18a9f1c9728fa5eca5d3601ad5b.zip
Make PROJ the CMake project name
Allow both find_package(PROJ) and find_package(PROJ4). More details are in cmake/CMakeLists.txt.
-rw-r--r--CMakeLists.txt10
-rw-r--r--cmake/CMakeLists.txt132
-rw-r--r--cmake/ProjConfig.cmake4
-rw-r--r--cmake/ProjInstallPath.cmake6
-rw-r--r--cmake/ProjUtilities.cmake8
-rw-r--r--cmake/ProjVersion.cmake24
-rw-r--r--cmake/project-config-version.cmake.in6
-rw-r--r--cmake/project-config.cmake.in33
-rw-r--r--docs/source/development/cmake.rst25
-rw-r--r--src/lib_proj.cmake10
10 files changed, 179 insertions, 79 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e0dba46..d3ccac86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,9 +11,7 @@
################################################################################
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
-# For historic reasons, the CMake PROJECT-NAME is PROJ4
-project(PROJ4 LANGUAGES C CXX)
-set(PROJECT_INTERN_NAME PROJ)
+project(PROJ LANGUAGES C CXX)
# Only interpret if() arguments as variables or keywords when unquoted
cmake_policy(SET CMP0054 NEW)
@@ -92,7 +90,7 @@ set(PROJ_CXX_WARN_FLAGS "${PROJ_CXX_WARN_FLAGS}"
# PROJ CMake modules
################################################################################
# Path to additional CMake modules
-set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
+set(CMAKE_MODULE_PATH ${PROJ_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
include(ProjUtilities)
@@ -235,7 +233,7 @@ set(DOCDIR "${DEFAULT_DOCDIR}"
set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}"
CACHE PATH "The directory to install includes into.")
set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}"
- CACHE PATH "The directory to install cmake config files into.")
+ CACHE PATH "Parent of the directory to install cmake config files into.")
################################################################################
# Tests
@@ -256,7 +254,7 @@ endif()
################################################################################
# Build configured components
################################################################################
-include_directories(${PROJ4_SOURCE_DIR}/src)
+include_directories(${PROJ_SOURCE_DIR}/src)
message(STATUS "")
add_subdirectory(data)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 23be1f23..c790fa4a 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,9 +1,78 @@
-# proj-config.cmake for the install tree. It's installed in
-# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
-# path to the root from there. (Note that the whole install tree can
-# be relocated.)
-file(RELATIVE_PATH PROJECT_ROOT_DIR
- ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGDIR} ${CMAKE_INSTALL_PREFIX})
+# The old CMake PROJECT-NAME was PROJ4.
+set (PROJECT_LEGACY_NAME PROJ4)
+string (TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
+string (TOLOWER "${PROJECT_LEGACY_NAME}" PROJECT_LEGACY_LOWER)
+
+# Starting with version 7.0, we install config-style find package
+# files so that PROJ can be found with both
+#
+# find_package(PROJ)
+# find_package(PROJ4)
+#
+# Here are the details... The command
+#
+# find_package(PROJ)
+#
+# if successful, will define variables
+#
+# PROJ_FOUND
+# PROJ_VERSION
+# PROJ_LIBRARIES = PROJ::proj
+# PROJ_INCLUDE_DIRS
+# etc
+#
+# and will define targets
+#
+# PROJ::proj
+# PROJ4::proj
+#
+# Similarly
+#
+# find_package(PROJ4)
+#
+# if successful, will define variables
+#
+# PROJ4_FOUND
+# PROJ4_VERSION
+# PROJ4_LIBRARIES = PROJ4::proj
+# PROJ4_INCLUDE_DIRS
+# etc
+#
+# and will define targets
+#
+# PROJ::proj
+# PROJ4::proj
+#
+# Note that targets PROJ::proj and PROJ4::proj are provided in both
+# cases. However, no attempt is made to define both sets of variables
+# with the two find_package options. Doing so would just lead to user
+# confusion.
+#
+# Because pre-7.0 versions of PROJ do not support find_package (PROJ)
+# and do not define a target PROJ::proj
+#
+# find_package(PROJ4)
+#
+# (instead of PROJ) should be used in any development scenarios which
+# might involve (even indirectly) pre-7.0 versions of PROJ.
+#
+# At some future dates, find_package (PROJ4) will
+#
+# define PROJ4_LIBRARIES = PROJ::proj
+# give WARNING message suggesting migration to find_package(PROJ)
+# be disallowed via the version checking code
+#
+# At some more distant date, the PROJ4::proj target will be retired.
+#
+# To support this change, the CACHE variables PROJ_CMAKE_SUBDIR (and
+# CMAKECONFIGDIR) is now the "Parent of directory to install cmake
+# config files into".
+#
+# All this messiness is confined to
+#
+# cmake/CMakeLists.txt (this file)
+# cmake/project-config.cmake.in
+# cmake/project-config-version.cmake.in
# Variables needed by ${PROJECT_NAME_LOWER}-config-version.cmake
if (MSVC)
@@ -24,21 +93,36 @@ else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()
-string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
-configure_file(project-config.cmake.in project-config.cmake @ONLY)
-configure_file(project-config-version.cmake.in
- project-config-version.cmake @ONLY)
-install(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
- DESTINATION "${CMAKECONFIGDIR}"
- RENAME "${PROJECT_NAME_LOWER}-config.cmake")
-install(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
- DESTINATION "${CMAKECONFIGDIR}"
- RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
-# Make information about the cmake targets (the library and the tools)
-# available.
-install(EXPORT targets
- NAMESPACE ${PROJECT_NAME}::
- FILE ${PROJECT_NAME_LOWER}-targets.cmake
- DESTINATION "${CMAKECONFIGDIR}")
+foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME})
+ string (TOLOWER "${PROJECT_VARIANT_NAME}" PROJECT_VARIANT_LOWER)
+ set (CMAKECONFIGSUBDIR "${CMAKECONFIGDIR}/${PROJECT_VARIANT_LOWER}")
+ # proj-config.cmake for the install tree. It's installed in
+ # ${CMAKECONFIGSUBDIR} and @PROJECT_ROOT_DIR@ is the relative
+ # path to the root from there. (Note that the whole install tree can
+ # be relocated.)
+ file (RELATIVE_PATH PROJECT_ROOT_DIR
+ ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGSUBDIR} ${CMAKE_INSTALL_PREFIX})
+ configure_file (project-config.cmake.in
+ project-${PROJECT_VARIANT_LOWER}-config.cmake @ONLY)
+ configure_file (project-config-version.cmake.in
+ project-${PROJECT_VARIANT_LOWER}-version.cmake @ONLY)
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/project-${PROJECT_VARIANT_LOWER}-config.cmake"
+ DESTINATION "${CMAKECONFIGSUBDIR}"
+ RENAME "${PROJECT_VARIANT_LOWER}-config.cmake")
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/project-${PROJECT_VARIANT_LOWER}-version.cmake"
+ DESTINATION "${CMAKECONFIGSUBDIR}"
+ RENAME "${PROJECT_VARIANT_LOWER}-config-version.cmake")
+ # Make information about the cmake targets (the library and the tools)
+ # available.
+ install(EXPORT targets
+ NAMESPACE ${PROJECT_NAME}::
+ FILE ${PROJECT_NAME_LOWER}-targets.cmake
+ DESTINATION "${CMAKECONFIGSUBDIR}")
+ install(EXPORT targets
+ NAMESPACE ${PROJECT_LEGACY_NAME}::
+ FILE ${PROJECT_LEGACY_LOWER}-targets.cmake
+ DESTINATION "${CMAKECONFIGSUBDIR}")
+endforeach ()
+
diff --git a/cmake/ProjConfig.cmake b/cmake/ProjConfig.cmake
index 9f1b4e44..661e6e4f 100644
--- a/cmake/ProjConfig.cmake
+++ b/cmake/ProjConfig.cmake
@@ -32,10 +32,10 @@ check_library_exists(m ceil "" HAVE_LIBM)
set(PACKAGE "proj")
set(PACKAGE_BUGREPORT "https://github.com/OSGeo/PROJ/issues")
set(PACKAGE_NAME "PROJ")
-set(PACKAGE_STRING "PROJ ${${PROJECT_INTERN_NAME}_VERSION}")
+set(PACKAGE_STRING "PROJ ${${PROJECT_NAME}_VERSION}")
set(PACKAGE_TARNAME "proj")
set(PACKAGE_URL "https://proj.org")
-set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}")
+set(PACKAGE_VERSION "${${PROJECT_NAME}_VERSION}")
# check if a second proj_config.h exists (created by ./configure)
# as this is within CMake's C_INCLUDES / CXX_INCLUDES
diff --git a/cmake/ProjInstallPath.cmake b/cmake/ProjInstallPath.cmake
index e74519b1..4c63d658 100644
--- a/cmake/ProjInstallPath.cmake
+++ b/cmake/ProjInstallPath.cmake
@@ -30,7 +30,7 @@ if(UNIX)
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})
+ set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake)
else()
# Common locations for Unix and Mac OS X
set(DEFAULT_BIN_SUBDIR bin)
@@ -39,7 +39,7 @@ else()
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})
+ set(DEFAULT_CMAKE_SUBDIR lib/cmake)
endif()
# Locations are changeable by user to customize layout of PROJ installation
@@ -55,7 +55,7 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
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")
+ "Parent of 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(
diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake
index d63cedac..447276ff 100644
--- a/cmake/ProjUtilities.cmake
+++ b/cmake/ProjUtilities.cmake
@@ -98,17 +98,17 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME)
message(SEND_ERROR "Error, the variable TARGET_NAME is not defined!")
endif()
- if(NOT DEFINED ${PROJECT_INTERN_NAME}_VERSION)
+ if(NOT DEFINED ${PROJECT_NAME}_VERSION)
message(SEND_ERROR
- "Error, the variable ${${PROJECT_INTERN_NAME}_VERSION} is not defined!")
+ "Error, the variable ${${PROJECT_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)
+ string(LENGTH "${${PROJECT_NAME}_ABI_VERSION}" abilen)
if(abilen GREATER 0)
- set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}")
+ set(SUFFIX "_${${PROJECT_NAME}_ABI_VERSION}")
endif()
endif()
diff --git a/cmake/ProjVersion.cmake b/cmake/ProjVersion.cmake
index 5614d44d..d64795a8 100644
--- a/cmake/ProjVersion.cmake
+++ b/cmake/ProjVersion.cmake
@@ -27,27 +27,27 @@ macro(proj_version)
${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(${PROJECT_NAME}_VERSION_MAJOR ${THIS_VERSION_MAJOR})
+ set(${PROJECT_NAME}_VERSION_MINOR ${THIS_VERSION_MINOR})
+ set(${PROJECT_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(${PROJECT_NAME}_VERSION
+ "${${PROJECT_NAME}_VERSION_MAJOR}.\
+${${PROJECT_NAME}_VERSION_MINOR}.\
+${${PROJECT_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}")
+ set(${PROJECT_NAME}_ABI_VERSION
+ "${${PROJECT_NAME}_VERSION_MAJOR}_\
+${${PROJECT_NAME}_VERSION_MINOR}")
endif()
message(STATUS "")
- boost_report_value(${PROJECT_INTERN_NAME}_VERSION)
+ boost_report_value(${PROJECT_NAME}_VERSION)
if(WIN32)
- boost_report_value(${PROJECT_INTERN_NAME}_ABI_VERSION)
+ boost_report_value(${PROJECT_NAME}_ABI_VERSION)
endif()
endmacro()
diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in
index 0d25a7c3..c2d98b39 100644
--- a/cmake/project-config-version.cmake.in
+++ b/cmake/project-config-version.cmake.in
@@ -1,4 +1,4 @@
-# Version checking for @PROJECT_NAME@
+# Version checking for @PROJECT_VARIANT_NAME@
set (PACKAGE_VERSION "@PROJ_VERSION@")
set (PACKAGE_VERSION_MAJOR "@PROJ_VERSION_MAJOR@")
@@ -22,12 +22,12 @@ else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()
-if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME@")
+if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_VARIANT_NAME@")
# Check package name (in particular, because of the way cmake finds
# package config files, the capitalization could easily be "wrong").
# This is necessary to ensure that the automatically generated
# variables, e.g., <package>_FOUND, are consistently spelled.
- set (REASON "package = @PROJECT_NAME@, NOT ${PACKAGE_FIND_NAME}")
+ set (REASON "package = @PROJECT_VARIANT_NAME@, NOT ${PACKAGE_FIND_NAME}")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
index fcb0698f..5ee5c0f9 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
@@ -1,31 +1,36 @@
# Configure @PROJECT_NAME@
#
# Set
-# @PROJECT_NAME@_FOUND = 1
-# @PROJECT_NAME@_INCLUDE_DIRS = /usr/local/include
-# @PROJECT_NAME@_LIBRARIES = proj
-# @PROJECT_NAME@_LIBRARY_DIRS = /usr/local/lib
-# @PROJECT_NAME@_BINARY_DIRS = /usr/local/bin
-# @PROJECT_NAME@_VERSION = 4.9.1 (for example)
+# @PROJECT_VARIANT_NAME@_FOUND = 1
+# @PROJECT_VARIANT_NAME@_INCLUDE_DIRS = /usr/local/include
+# @PROJECT_VARIANT_NAME@_LIBRARIES = @PROJECT_VARIANT_NAME@::proj
+# @PROJECT_VARIANT_NAME@_LIBRARY_DIRS = /usr/local/lib
+# @PROJECT_VARIANT_NAME@_BINARY_DIRS = /usr/local/bin
+# @PROJECT_VARIANT_NAME@_VERSION = 4.9.1 (for example)
message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
-# @PROJECT_NAME@_VERSION is set by version file
+# @PROJECT_VARIANT_NAME@_VERSION is set by version file
message (STATUS
- "@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}")
+ "@PROJECT_VARIANT_NAME@ configuration, \
+version ${@PROJECT_VARIANT_NAME@_VERSION}")
# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
-set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
-set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
-set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
+set (@PROJECT_VARIANT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
+set (@PROJECT_VARIANT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
+set (@PROJECT_VARIANT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
-set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj)
+set (@PROJECT_VARIANT_NAME@_LIBRARIES @PROJECT_VARIANT_NAME@::proj)
# Read in the exported definition of the library
include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
+include ("${_DIR}/@PROJECT_LEGACY_LOWER@-targets.cmake")
unset (_ROOT)
unset (_DIR)
-# For backward compatibility with old releases of libgeotiff
-set (@PROJECT_NAME@_INCLUDE_DIR ${@PROJECT_NAME@_INCLUDE_DIRS})
+if ("@PROJECT_VARIANT_NAME@" STREQUAL "PROJ4")
+ # For backward compatibility with old releases of libgeotiff
+ set (@PROJECT_VARIANT_NAME@_INCLUDE_DIR
+ ${@PROJECT_VARIANT_NAME@_INCLUDE_DIRS})
+endif ()
diff --git a/docs/source/development/cmake.rst b/docs/source/development/cmake.rst
index 5a8ce624..e965f46e 100644
--- a/docs/source/development/cmake.rst
+++ b/docs/source/development/cmake.rst
@@ -5,26 +5,39 @@ Using PROJ in CMake projects
********************************************************************************
The recommended way to use the PROJ library in a CMake project is to
-link to the imported library target ``${PROJ4_LIBRARIES}`` provided by
+link to the imported library target ``${PROJ_LIBRARIES}`` provided by
the CMake configuration which comes with the library. Typical usage is:
.. code::
- find_package(PROJ4)
+ find_package(PROJ)
- target_link_libraries(MyApp ${PROJ4_LIBRARIES})
+ target_link_libraries(MyApp ${PROJ_LIBRARIES})
-By adding the imported library target ``${PROJ4_LIBRARIES}`` to the
+By adding the imported library target ``${PROJ_LIBRARIES}`` to the
target link libraries, CMake will also pass the include directories to
the compiler. This requires that you use CMake version 2.8.11 or later.
If you are using an older version of CMake, then add
.. code::
- include_directories(${PROJ4_INCLUDE_DIRS})
+ include_directories(${PROJ_INCLUDE_DIRS})
The CMake command ``find_package`` will look for the configuration in a
number of places. The lookup can be adjusted for all packages by setting
the cache variable or environment variable ``CMAKE_PREFIX_PATH``. In
particular, CMake will consult (and set) the cache variable
-``PROJ4_DIR``.
+``PROJ_DIR``.
+
+The old CMake name for the PROJ project was "PROJ4" and the switch to
+the name "PROJ" was made with version 7.0. So if you expect your
+package to work with pre-7.0 versions of PROJ, you will need to use
+
+.. code::
+
+ find_package(PROJ4)
+ target_link_libraries(MyApp ${PROJ4_LIBRARIES})
+ include_directories(${PROJ4_INCLUDE_DIRS})
+
+This will also find version 7.0. This use of the PROJ4 name will be
+phased out at some point.
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index 6bae0778..3c42f973 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -331,7 +331,7 @@ set(ALL_LIBPROJ_SOURCES
set(ALL_LIBPROJ_HEADERS ${HEADERS_LIBPROJ})
# Core targets configuration
-string(TOLOWER "${PROJECT_INTERN_NAME}" PROJECTNAMEL)
+string(TOLOWER "${PROJECT_NAME}" PROJECTNAMEL)
set(PROJ_CORE_TARGET ${PROJECTNAMEL})
proj_target_output_name(${PROJ_CORE_TARGET} PROJ_CORE_TARGET_OUTPUT_NAME)
@@ -382,21 +382,21 @@ target_include_directories(${PROJ_CORE_TARGET} INTERFACE
if(WIN32)
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
- VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
+ VERSION "${${PROJECT_NAME}_BUILD_VERSION}"
OUTPUT_NAME "${PROJ_CORE_TARGET_OUTPUT_NAME}"
ARCHIVE_OUTPUT_NAME "${PROJ_CORE_TARGET}"
CLEAN_DIRECT_OUTPUT 1)
elseif(BUILD_FRAMEWORKS_AND_BUNDLE)
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
- VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
+ VERSION "${${PROJECT_NAME}_BUILD_VERSION}"
INSTALL_NAME_DIR ${PROJ_INSTALL_NAME_DIR}
CLEAN_DIRECT_OUTPUT 1)
else()
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
- VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
- SOVERSION "${${PROJECT_INTERN_NAME}_API_VERSION}"
+ VERSION "${${PROJECT_NAME}_BUILD_VERSION}"
+ SOVERSION "${${PROJECT_NAME}_API_VERSION}"
CLEAN_DIRECT_OUTPUT 1)
endif()