SHA256
1
0
forked from pool/rtmidi
rtmidi/rtmidi-cmake.patch

32 lines
1.0 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a85a03..a75cce4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
# CopyPolicy: RtMidi license.
# Set minimum CMake required version for this project.
-cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
# Define a C++ project.
project(RtMidi LANGUAGES CXX C)
@@ -248,6 +248,8 @@ string(REPLACE ";" " " req "${PKGCONFIG_REQUIRES}")
string(REPLACE ";" " " req_libs "${LIBS_REQUIRES}")
string(REPLACE ";" " " api "${API_DEFS}")
set(prefix ${CMAKE_INSTALL_PREFIX})
+set(libdir ${CMAKE_INSTALL_LIBDIR})
+set(includedir ${CMAKE_INSTALL_INCLUDEDIR})
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rtmidi.pc.in" "rtmidi.pc" @ONLY)
# Add install rule.
@@ -262,7 +264,7 @@ install(TARGETS ${LIB_TARGETS}
export(PACKAGE RtMidi)
# Set installation path for CMake files.
-set(RTMIDI_CMAKE_DESTINATION share/rtmidi)
+set(RTMIDI_CMAKE_DESTINATION ${CMAKE_MODULES_INSTALL_DIR})
# Export library target (build-tree).
export(EXPORT RtMidiTargets