blob: b39467889ceabd83cf4f877e72a47e8a4270c74f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--- cmake/Modules/GrMiscUtils.cmake.orig 2013-08-28 13:27:03.000000000 -0500
+++ cmake/Modules/GrMiscUtils.cmake 2014-03-02 20:19:48.000000000 -0500
@@ -142,7 +142,31 @@
ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT} # .lib file
RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file
)
+
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ #create .la file
+ GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR})
+ set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target} SOVERSION ${LIBVER})
+ set(target_name lib${target}.so.${LIBVER})
+
+ #custom command to generate symlinks
+ add_custom_command(
+ TARGET ${target}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} "${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} "${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so.${MAJOR_VERSION}"
+ COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install
+ )
+ #and install the extra symlinks
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so.${MAJOR_VERSION}
+ ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so.${LIBVER}
+ DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT}
+ )
+ endif()
#extras mode enabled automatically on linux
if(NOT DEFINED LIBRARY_EXTRAS)
set(LIBRARY_EXTRAS ${LINUX})
|