diff --git a/cmake/templates/HPXConfig.cmake.in b/cmake/templates/HPXConfig.cmake.in index 257e52a1415f..5c2b68ba7052 100644 --- a/cmake/templates/HPXConfig.cmake.in +++ b/cmake/templates/HPXConfig.cmake.in @@ -32,7 +32,7 @@ endif() # find_package. if(HPX_COMMAND_LINE_HANDLING_WITH_JSON_CONFIGURATION_FILES) if(HPX_WITH_FETCH_JSON) - include("${CMAKE_CURRENT_LIST_DIR}/HPXJSONTarget.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/HPXJsonTarget.cmake") else() set(HPX_JSON_ROOT "@Json_ROOT@") include(HPX_SetupJSON) diff --git a/docs/sphinx/releases/whats_new_1_10_0.rst b/docs/sphinx/releases/whats_new_1_10_0.rst index c8e5d6dad820..38ed581aa559 100644 --- a/docs/sphinx/releases/whats_new_1_10_0.rst +++ b/docs/sphinx/releases/whats_new_1_10_0.rst @@ -1,4 +1,4 @@ -.. +.. Copyright (C) 2007-2023 Hartmut Kaiser SPDX-License-Identifier: BSL-1.0 @@ -17,9 +17,11 @@ General changes Breaking changes ================ -- The CMake configuration keys ``SOMELIB_ROOT`` (e.g., ``BOOST_ROOT``) has been +- The |cmake| configuration keys ``SOMELIB_ROOT`` (e.g., ``BOOST_ROOT``) have been renamed to ``Somelib_ROOT`` (e.g., ``Boost_ROOT``) to avoid warnings when using - newer versions of CMake. Please update your scripts accordingly. + newer versions of |cmake|. Please update your scripts accordingly. For now, the + old variable names are re-assigned to the new names and unset in the |cmake| + cache. Closed issues ============= diff --git a/libs/core/command_line_handling_local/CMakeLists.txt b/libs/core/command_line_handling_local/CMakeLists.txt index b46c96205e01..51d744771110 100644 --- a/libs/core/command_line_handling_local/CMakeLists.txt +++ b/libs/core/command_line_handling_local/CMakeLists.txt @@ -39,7 +39,7 @@ set(command_line_handling_local_sources if(HPX_COMMAND_LINE_HANDLING_WITH_JSON_CONFIGURATION_FILES) include(HPX_SetupJSON) - set(command_line_handling_local_dependencies JSON::json) + set(command_line_handling_local_dependencies Json::json) set(command_line_handling_local_headers ${command_line_handling_local_headers} diff --git a/libs/core/command_line_handling_local/cmake/HPX_SetupJSON.cmake b/libs/core/command_line_handling_local/cmake/HPX_SetupJSON.cmake index 119cb8eb07e3..faf92256426e 100644 --- a/libs/core/command_line_handling_local/cmake/HPX_SetupJSON.cmake +++ b/libs/core/command_line_handling_local/cmake/HPX_SetupJSON.cmake @@ -15,7 +15,7 @@ endif() if(NOT HPX_WITH_FETCH_JSON) find_package(nlohmann_json 3.2.0 REQUIRED) -elseif(NOT TARGET JSON::json) +elseif(NOT TARGET Json::json) if(NOT HPX_WITH_JSON_TAG) set(HPX_WITH_JSON_TAG "v3.11.2") endif() @@ -26,7 +26,7 @@ elseif(NOT TARGET JSON::json) ) else() hpx_info( - "HPX_WITH_FETCH_JSON=${HPX_WITH_FETCH_JSON}, JSON will be fetched using CMake's FetchContent and installed alongside HPX (HPX_WITH_Json_TAG=${HPX_WITH_Json_TAG})" + "HPX_WITH_FETCH_JSON=${HPX_WITH_FETCH_JSON}, JSON will be fetched using CMake's FetchContent and installed alongside HPX (HPX_WITH_JSON_TAG=${HPX_WITH_JSON_TAG})" ) endif() @@ -45,11 +45,11 @@ elseif(NOT TARGET JSON::json) json SYSTEM INTERFACE $ $ ) - target_compile_definitions(json INTERFACE Json_HAS_CPP_17) + target_compile_definitions(json INTERFACE JSON_HAS_CPP_17) install( TARGETS json - EXPORT HPXJSONTarget + EXPORT HPXJsonTarget COMPONENT core ) @@ -63,17 +63,17 @@ elseif(NOT TARGET JSON::json) export( TARGETS json - NAMESPACE JSON:: - FILE "${CMAKE_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/HPXJSONTarget.cmake" + NAMESPACE Json:: + FILE "${CMAKE_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/HPXJsonTarget.cmake" ) install( - EXPORT HPXJSONTarget - NAMESPACE JSON:: - FILE HPXJSONTarget.cmake + EXPORT HPXJsonTarget + NAMESPACE Json:: + FILE HPXJsonTarget.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${HPX_PACKAGE_NAME} COMPONENT cmake ) - add_library(JSON::json ALIAS json) + add_library(Json::json ALIAS json) endif()