]> FriiDump Source - friidump.git/blob - libmultihash/CMakeLists.txt
Document exact-release Linux hardware validation
[friidump.git] / libmultihash / CMakeLists.txt
1 # Create a library called "Hello" which includes the source file "hello.cxx".
2 # The extension is already found.  Any number of sources could be listed here.
3 add_library (
4         multihashlib
5         ${libmultihash_type}
6         #SHARED
7         #STATIC
8
9         crc32.c
10         edonkey.c
11         md4.c
12         md5.c
13         multihash.c
14         sha1.c
15         sha2.c
16         crc32.h
17         edonkey.h
18         md4.h
19         md5.h
20         multihash.h
21         sha1.h
22         sha2.h
23 )
24
25 set_target_properties (multihashlib PROPERTIES OUTPUT_NAME "multihash")
26
27 # Before making a release, the LTVERSION string should be modified.
28 # The string is of the form CURRENT:REVISION:AGE.
29 #
30 # CURRENT (C)
31 # The most recent interface number that this library implements.
32 #
33 # REVISION (R)
34 # The implementation number that this library implements.
35 #
36 # AGE (A)
37 # The difference between the newest and oldest interfaces that this
38 # library implements. In other works, the library implements all the
39 # interface numbers in the range from number 'CURRENT - AGE' to
40 # 'CURRENT'.
41 #
42 # This means that:
43 #
44 #   - If interfaces have been changed or added, but binary compatibility has
45 #     been preserved, change to C+1:0:A+1
46 #
47 #   - If binary compatibility has been broken (eg removed or changed
48 #     interfaces) change to C+1:0:0
49 #
50 #   - If the interface is the same as the previous version, change to C:R+1:A
51 #
52 set_target_properties (multihashlib PROPERTIES SOVERSION 1.0.0)
53
54
55 #get_target_property(libhash_type multihashlib TYPE)
56 if (WIN32)
57         if (libhash_type STREQUAL "SHARED")
58 #               MESSAGE ("Building libmultihash DLL")
59                 ADD_DEFINITIONS (-DMULTIHASH_BUILD_DLL)
60         
61                 set_target_properties (multihashlib PROPERTIES DEFINE_SYMBOL MULTIHASH_EXPORTS)
62         
63                 install (
64                         TARGETS multihashlib
65                         RUNTIME DESTINATION /
66                         #ARCHIVE DESTINATION lib
67                 )
68         endif (libhash_type STREQUAL "SHARED")
69 else (WIN32)
70         # Install stuff, only if a shared library is being built
71         if (libhash_type STREQUAL "SHARED")
72                 install (
73                         TARGETS multihashlib
74                         LIBRARY DESTINATION lib
75                         ARCHIVE DESTINATION lib/static
76                 )
77         endif (libhash_type STREQUAL "SHARED")
78 endif (WIN32)
79