From 1771567da6e64db97063355dc9bbbf71aca6fc55 Mon Sep 17 00:00:00 2001 From: Dhruv Govil Date: Tue, 9 Jul 2024 12:02:09 -0700 Subject: [PATCH] Upgrade required CMake to 3.24 This change updates the minimum required CMake to 3.24. It also removes a workaround needed for CMake 3.16 that required tricking CMake into thinking the `.mm` file was a CXX file instead of ObjC++. With newer CMake versions, this can implicitly be handled as long as the `.mm` file doesn't share a name with an existing CXX file. Signed-off-by: Dhruv Govil --- CMakeLists.txt | 2 +- source/MaterialXGraphEditor/CMakeLists.txt | 3 +-- .../{FileDialog.mm => FileDialog_Darwin.mm} | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename source/MaterialXGraphEditor/{FileDialog.mm => FileDialog_Darwin.mm} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4505ab106b..26ff8ff2d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(MATERIALX_BUILD_VERSION 0) set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSION}.${MATERIALX_BUILD_VERSION}) # Cmake setup -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.24) set(CMAKE_CXX_STANDARD 17) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) set(CMAKE_MACOSX_RPATH ON) diff --git a/source/MaterialXGraphEditor/CMakeLists.txt b/source/MaterialXGraphEditor/CMakeLists.txt index 495213bfb6..bd2405d432 100644 --- a/source/MaterialXGraphEditor/CMakeLists.txt +++ b/source/MaterialXGraphEditor/CMakeLists.txt @@ -18,8 +18,7 @@ file(GLOB materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") file(GLOB materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") if (APPLE) - list(APPEND materialx_source ${CMAKE_CURRENT_SOURCE_DIR}/FileDialog.mm) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/FileDialog.mm" PROPERTIES LANGUAGE CXX) + list(APPEND materialx_source ${CMAKE_CURRENT_SOURCE_DIR}/FileDialog_Darwin.mm) endif () file(GLOB imgui_source "${DEAR_IMGUI_PREFIX}/*.cpp") diff --git a/source/MaterialXGraphEditor/FileDialog.mm b/source/MaterialXGraphEditor/FileDialog_Darwin.mm similarity index 100% rename from source/MaterialXGraphEditor/FileDialog.mm rename to source/MaterialXGraphEditor/FileDialog_Darwin.mm