Skip to content

Commit af94ac5

Browse files
committed
reconciling merge
2 parents 20eb577 + e9362a6 commit af94ac5

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

.VERSION

-1
This file was deleted.

CMakeLists.txt

+9-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# this software. The contributing author, Izaak Beekman, retains all
1010
# rights permitted by the terms of the JSON-Fortran license.
1111

12-
cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
12+
cmake_minimum_required ( VERSION 3.0 FATAL_ERROR )
1313

1414
# Use MSVS folders to organize projects on windows
1515
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -34,7 +34,11 @@ include ( "cmake/checkOutOfSource.cmake" )
3434
#---------------------
3535
# Declare project name
3636
#---------------------
37-
project ( jsonfortran NONE )
37+
project (
38+
jsonfortran
39+
VERSION 8.3.0
40+
LANGUAGES Fortran
41+
)
3842

3943
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
4044
option(JSON_FORTRAN_USE_OpenCoarrays
@@ -70,16 +74,6 @@ elseif(${JSON_INT_KIND} MATCHES "INT64")
7074
add_definitions(-DINT64)
7175
endif()
7276

73-
#----------------------------------
74-
# Get version (semantic versioning)
75-
# C.F. semver.org
76-
#----------------------------------
77-
file ( STRINGS "${PROJECT_SOURCE_DIR}/.VERSION" VERSION )
78-
string( REPLACE "." ";" VERSION_LIST ${VERSION} )
79-
list(GET VERSION_LIST 0 VERSION_MAJOR)
80-
list(GET VERSION_LIST 1 VERSION_MINOR)
81-
list(GET VERSION_LIST 2 VERSION_PATCH)
82-
set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
8377
message ( STATUS "CMake build configuration for JSON-Fortran ${PROJECT_VERSION}" )
8478

8579
#-------------------------------------
@@ -196,7 +190,7 @@ set_target_properties ( ${LIB_NAME}-static
196190
if(NOT MSVC_IDE)
197191
PREFIX lib
198192
endif()
199-
VERSION ${VERSION}
193+
VERSION ${PROJECT_VERSION}
200194
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib
201195
Fortran_MODULE_DIRECTORY ${MODULE_DIR} )
202196
set_target_properties ( ${LIB_NAME}
@@ -205,8 +199,8 @@ set_target_properties ( ${LIB_NAME}
205199
if(NOT MSVC_IDE)
206200
PREFIX lib
207201
endif()
208-
SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}
209-
VERSION ${VERSION}
202+
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
203+
VERSION ${PROJECT_VERSION}
210204
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib
211205
Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR} )
212206

packaging/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ install ( EXPORT ${PACKAGE_NAME}-targets
44

55
include ( CMakePackageConfigHelpers ) # Standard CMake module
66
write_basic_package_version_file( "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake"
7-
VERSION ${VERSION}
7+
VERSION ${PROJECT_VERSION}
88
COMPATIBILITY SameMajorVersion )
99

1010
# provides COMPILER_CONSISTENCY_CHECK

0 commit comments

Comments
 (0)