Skip to content

Commit

Permalink
Merge pull request #63 from Goddard-Fortran-Ecosystem/hotfix/gnu-make…
Browse files Browse the repository at this point in the history
…-fixes

Fixes for GNU Make
  • Loading branch information
tclune authored Jan 23, 2023
2 parents 3004543 + eac9246 commit 1487681
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12)

project (YAFYAML
VERSION 1.0.4
VERSION 1.0.5
LANGUAGES Fortran)

# Most users of this software do not (should not?) have permissions to
Expand Down Expand Up @@ -64,6 +64,11 @@ endif ()

add_subdirectory (Examples EXCLUDE_FROM_ALL)

# The following is needed for external projects using *nix make when
# parent project builds gFTL-shared as a subproject.
set (top_dir YAFYAML-${YAFYAML_VERSION_MAJOR}.${YAFYAML_VERSION_MINOR})
set (YAFYAML_TOP_DIR "${CMAKE_INSTALL_PREFIX}/${top_dir}" CACHE PATH "")

include(CMakePackageConfigHelpers)
configure_package_config_file(YAFYAMLConfig.cmake.in YAFYAMLConfig.cmake
INSTALL_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/YAYFAMLConfig.cmake
Expand All @@ -73,18 +78,10 @@ write_basic_package_version_file(YAFYAMLConfig-version.cmake
COMPATIBILITY SameMajorVersion
)

set (top_dir YAFYAML-${YAFYAML_VERSION_MAJOR}.${YAFYAML_VERSION_MINOR})
install (
FILES ${PROJECT_BINARY_DIR}/YAFYAMLConfig.cmake ${PROJECT_BINARY_DIR}/YAFYAMLConfig-version.cmake
DESTINATION "${top_dir}/cmake")

# The following is needed for external projects using *nix make when
# parent project builds gFTL-shared as a subproject.
set (YAFYAML_TOP_DIR "${CMAKE_INSTALL_PREFIX}/${top_dir}" CACHE PATH "")

# The following is needed for external projects using *nix make when
# parent project builds yafyaml as a subproject.
set (YAFYAML_TOP_DIR "${CMAKE_INSTALL_PREFIX}/${top_dir}" CACHE PATH "")
configure_file (YAFYAML.mk.in ${PROJECT_BINARY_DIR}/YAFYAML.mk @ONLY)
install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/YAFYAML.mk ${CMAKE_CURRENT_BINARY_DIR}/YAFYAML.mk
Expand Down
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.5] - 2023-01-23

### Fixed

- Fixes for GNU Make builds

## [1.0.4] 2022-06-30

### Fixed
Expand Down
1 change: 1 addition & 0 deletions YAFYAMLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ include(CMakeFindDependencyMacro)
find_dependency(GFTL)
find_dependency(GFTL_SHARED)

set(YAFYAML_TOP_DIR "@YAFYAML_TOP_DIR@")
include ("${CMAKE_CURRENT_LIST_DIR}/YAFYAMLTargets.cmake")

0 comments on commit 1487681

Please sign in to comment.