summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--daemon/CMakeLists.txt2
-rw-r--r--daemon/main.c2
-rw-r--r--libusbmuxd/CMakeLists.txt2
4 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f7ebc1..b995967 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,11 @@
PROJECT(usbmuxd)
+SET ( USBMUXD_VERSION_MAJOR "1" )
+SET ( USBMUXD_VERSION_MINOR "0" )
+SET ( LIBUSBMUXD_SOVERSION "0" )
+SET ( USBMUXD_VERSION "${USBMUXD_VERSION_MAJOR}.${USBMUXD_VERSION_MINOR}" )
+SET ( LIBUSBMUXD_VERSION "${LIBUSBMUXD_SOVERSION}.${USBMUXD_VERSION}" )
+
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Modules/")
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index 45565d1..e5f9b11 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -25,7 +25,7 @@ Please apply the patch in the contrib/ directory to your libusb 1.0 tree.
add_definitions(-DEXPLICIT_ZLP_TRANSACTION)
endif(NOT HAVE_LIBUSB_ZLP)
-add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON)
+add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON -DUSBMUXD_VERSION="${USBMUXD_VERSION}")
add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c)
target_link_libraries(usbmuxd ${LIBS})
diff --git a/daemon/main.c b/daemon/main.c
index dde99c2..ef98e75 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -389,7 +389,7 @@ int main(int argc, char *argv[])
/* set log level to specified verbosity */
log_level = verbose;
- usbmuxd_log(LL_NOTICE, "usbmux v0.1 starting up");
+ usbmuxd_log(LL_NOTICE, "usbmux v%s starting up", USBMUXD_VERSION);
should_exit = 0;
set_signal_handlers();
diff --git a/libusbmuxd/CMakeLists.txt b/libusbmuxd/CMakeLists.txt
index accdbc4..cb0d259 100644
--- a/libusbmuxd/CMakeLists.txt
+++ b/libusbmuxd/CMakeLists.txt
@@ -6,6 +6,8 @@ add_library (libusbmuxd SHARED libusbmuxd.c sock_stuff.c ../common/utils.c)
# But we can't use that due to the conflict with the usbmuxd daemon,
# so instead change the library output base name to usbmuxd here
set_target_properties(libusbmuxd PROPERTIES OUTPUT_NAME usbmuxd)
+set_target_properties(libusbmuxd PROPERTIES VERSION ${LIBUSBMUXD_VERSION})
+set_target_properties(libusbmuxd PROPERTIES SOVERSION ${LIBUSBMUXD_VERSION})
install(TARGETS libusbmuxd
ARCHIVE DESTINATION lib