Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit e4d0f5b

Browse files
committed
Add proper pkgconfig file and fix versioning
1 parent 2cacea0 commit e4d0f5b

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ cmake_minimum_required(VERSION 2.8)
22

33
project(wds CXX)
44

5+
set(WDS_VERSION_MAJOR 0)
6+
set(WDS_VERSION_MINOR 1)
7+
set(WDS_VERSION_PATCH 0)
8+
59
enable_testing()
610

711
include(GNUInstallDirs)
812

13+
add_subdirectory(data)
914
add_subdirectory(libwds/rtsp)
1015
add_subdirectory(libwds/common)
1116
add_subdirectory(libwds/source)

data/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
configure_file(wds.pc.in wds.pc @ONLY)
2+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wds.pc
3+
DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig)

data/wds.pc.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
exec_prefix=${prefix}
3+
libdir=${prefix}/@LIB_INSTALL_DIR@
4+
includedir=${exec_prefix}/include
5+
6+
Name: @CMAKE_PROJECT_NAME@
7+
Description: Library to build Miracast/WiDi-enabled applications
8+
Version: @WDS_VERSION_MAJOR@.@WDS_VERSION_MINOR@.@WDS_VERSION_PATCH@
9+
Libs: -L${libdir} -lwds
10+
Cflags: -I${includedir}/wds

libwds/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ add_library(wds
77
$<TARGET_OBJECTS:wdscommon>
88
$<TARGET_OBJECTS:wdssink>
99
$<TARGET_OBJECTS:wdssource>)
10-
set_target_properties(wds PROPERTIES SOVERSION 1)
10+
set_target_properties(wds PROPERTIES
11+
VERSION ${WDS_VERSION_MAJOR}.${WDS_VERSION_MINOR}.${WDS_VERSION_PATCH}
12+
SOVERSION ${WDS_VERSION_MAJOR})
1113

1214
install(TARGETS wds LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
1315

0 commit comments

Comments
 (0)