From 905676309a407b9a50118b31370b73ec411a6f8b Mon Sep 17 00:00:00 2001
From: Marton Szasz <szaszm@apache.org>
Date: Mon, 31 Mar 2025 14:48:01 +0200
Subject: [PATCH] MINIFICPP-2553 CMP0065=OLD removed in cmake 4.0, removed
 override

Signed-off-by: Marton Szasz <szaszm@apache.org>
Signed-off-by: Gabor Gyimesi <gamezbird@gmail.com>

This closes #1957

Upstream-Status: Backport [26aea0d8280986713b441cda3fd3858c80d21f65]
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
---
 CMakeLists.txt             | 1 -
 minifi_main/CMakeLists.txt | 1 -
 2 files changed, 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70c94c2f..6673e331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,6 @@
 
 cmake_minimum_required(VERSION 3.24)
 cmake_policy(SET CMP0096 NEW) # policy to preserve the leading zeros in PROJECT_VERSION_{MAJOR,MINOR,PATCH,TWEAK}
-cmake_policy(SET CMP0065 OLD) # default export policy, required for self-dlopen
 cmake_policy(SET CMP0135 NEW) # policy to set the timestamps of extracted contents to the time of extraction
 
 project(nifi-minifi-cpp VERSION 0.99.1)
diff --git a/minifi_main/CMakeLists.txt b/minifi_main/CMakeLists.txt
index 62eb234f..1a2e9e0e 100644
--- a/minifi_main/CMakeLists.txt
+++ b/minifi_main/CMakeLists.txt
@@ -69,7 +69,6 @@ target_link_libraries(minifiexe spdlog libsodium gsl-lite argparse ${LIBMINIFI})
 
 set_target_properties(minifiexe PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 set_target_properties(minifiexe PROPERTIES OUTPUT_NAME minifi)
-set_target_properties(minifiexe PROPERTIES ENABLE_EXPORTS True)
 if (WIN32)
     target_compile_definitions(minifiexe PUBLIC SERVICE_NAME="Apache NiFi MINiFi")
 endif()
