Browse code

use find_library

Nat! authored on 27/10/2016 13:36:29
Showing 3 changed files
... ...
@@ -37,18 +37,29 @@ src/mulle_concurrent_standalone.c
37 37
 
38 38
 add_dependencies( mulle_concurrent_standalone mulle_concurrent)
39 39
 
40
+find_library( MULLE_ABA_LIBRARY            NAMES mulle_aba)
41
+find_library( MULLE_ALLOCATOR_LIBRARY      NAMES mulle_allocator)
42
+find_library( MULLE_TEST_ALLOCATOR_LIBRARY NAMES mulle_test_allocator)
43
+find_library( MULLE_THREAD_LIBRARY         NAMES mulle_thread)
44
+
45
+message(STATUS "MULLE_ABA_LIBRARY is ${MULLE_ABA_LIBRARY}")
46
+message(STATUS "MULLE_ALLOCATOR_LIBRARY is ${MULLE_ALLOCATOR_LIBRARY}")
47
+message(STATUS "MULLE_TEST_ALLOCATOR_LIBRARY is ${MULLE_TEST_ALLOCATOR_LIBRARY}")
48
+message(STATUS "MULLE_THREAD_LIBRARY is ${MULLE_THREAD_LIBRARY}")
49
+
50
+set( DEPENDENCY_LIBRARIES
51
+${MULLE_ABA_LIBRARY}
52
+${MULLE_ALLOCATOR_LIBRARY}
53
+${MULLE_TEST_ALLOCATOR_LIBRARY}
54
+${MULLE_THREAD_LIBRARY}
55
+)
56
+
40 57
 TARGET_LINK_LIBRARIES( mulle_concurrent_standalone
41 58
 ${BEGIN_ALL_LOAD}
42 59
 mulle_concurrent
43
-mulle_aba
44
-mulle_allocator
45
-mulle_test_allocator
60
+${DEPENDENCY_LIBRARIES}
46 61
 ${END_ALL_LOAD}
47 62
 )
48 63
 
49
-
50
-
51 64
 INSTALL( TARGETS mulle_concurrent_standalone mulle_concurrent DESTINATION "lib")
52 65
 INSTALL( FILES ${HEADERS} DESTINATION "include/mulle_concurrent")
53
-
54
-
... ...
@@ -1,8 +1,9 @@
1
-1.0.1-1.0.6
1
+1.0.1-1.0.7
2 2
 ===
3 3
 
4 4
 * fix packaging
5 5
 * improve documentation
6
+* use find_library in CMakeLists.txt
6 7
 
7 8
 
8 9
 # v1.0
... ...
@@ -35,7 +35,7 @@
35 35
 #define mulle_concurrent_h__
36 36
 
37 37
 
38
-#define MULLE_CONCURRENT_VERSION  ((1 << 20) | (0 << 8) | 6)
38
+#define MULLE_CONCURRENT_VERSION  ((1 << 20) | (0 << 8) | 7)
39 39
 
40 40
 #include <mulle_thread/mulle_thread.h>
41 41
 #include <mulle_allocator/mulle_allocator.h>