]> Repos - portaudio/commitdiff
supply pkg-config version via setting in CMakeLists.txt - allow installation when...
authorNicholas Appleton <nick@appletonaudio.com>
Tue, 13 Sep 2016 12:04:31 +0000 (22:04 +1000)
committerNicholas Appleton <nick@appletonaudio.com>
Tue, 13 Sep 2016 12:04:31 +0000 (22:04 +1000)
CMakeLists.txt
cmake_support/portaudio-2.0.pc.in

index 44ea2fe2719c9f832d6b4d6eef796236a5a09666..e842dc33273c363891e0f7a45ce59423eb09e5bb 100644 (file)
@@ -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)
index 7d5cd6f159a959bb6856c678f6342520835e365d..738803da069195b76f38fded4293cf5ce91717fa 100644 (file)
@@ -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@