From 0fc163720c8c70325a83ae4477f7df6ab26f4fff Mon Sep 17 00:00:00 2001 From: Nicholas Appleton Date: Tue, 13 Sep 2016 22:04:31 +1000 Subject: [PATCH] supply pkg-config version via setting in CMakeLists.txt - allow installation when using MinGW --- CMakeLists.txt | 4 +++- cmake_support/portaudio-2.0.pc.in | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44ea2fe..e842dc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,8 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) ENDIF(WIN32 AND MSVC) ENDIF() +SET(PA_PKGCONFIG_VERSION 19) + # Most of the code from this point onwards is related to populating the # following variables: # PA_PUBLIC_INCLUDES - This contains the list of public PortAudio header @@ -352,7 +354,7 @@ TARGET_INCLUDE_DIRECTORIES(portaudio_static PRIVATE ${PA_PRIVATE_INCLUDE_PATHS}) TARGET_INCLUDE_DIRECTORIES(portaudio_static PUBLIC include) TARGET_LINK_LIBRARIES(portaudio_static ${PA_LIBRARY_DEPENDENCIES}) -IF(WIN32) +IF(WIN32 AND MSVC) OPTION(PA_CONFIG_LIB_OUTPUT_PATH "Make sure that output paths are kept neat" OFF) IF(CMAKE_CL_64) SET(TARGET_POSTFIX x64) diff --git a/cmake_support/portaudio-2.0.pc.in b/cmake_support/portaudio-2.0.pc.in index 7d5cd6f..738803d 100644 --- a/cmake_support/portaudio-2.0.pc.in +++ b/cmake_support/portaudio-2.0.pc.in @@ -6,7 +6,7 @@ includedir=${prefix}/include Name: PortAudio Description: Portable audio I/O Requires: -Version: 19 +Version: @PA_PKGCONFIG_VERSION@ Libs: -L${libdir} -lportaudio @PA_PKGCONFIG_LDFLAGS@ Cflags: -I${includedir} @PA_PKGCONFIG_CFLAGS@ -- 2.43.0