diff options
author | Henrik Andersson <henrik.andersson@cendio.com> | 2011-06-09 13:26:05 +0000 |
---|---|---|
committer | Henrik Andersson <henrik.andersson@cendio.com> | 2011-06-09 13:26:05 +0000 |
commit | 697954f0f12c0c771300e20724e7f9283921a2ad (patch) | |
tree | 92e9960b21e46f9991ccfcba474f8e70721a6456 /cmake/Modules | |
parent | 554b3eeca3f58ce920480e7beceac2397bf0f5dd (diff) | |
download | tigervnc-697954f0f12c0c771300e20724e7f9283921a2ad.tar.gz tigervnc-697954f0f12c0c771300e20724e7f9283921a2ad.zip |
- Fixed so the library suffix is platformindependent
- Added custom commands to create .libs and symlink to
static library so that autotools can actually find the
library in expected place.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4484 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/CMakeMacroLibtoolFile.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake index 514793e5..09f9494d 100644 --- a/cmake/Modules/CMakeMacroLibtoolFile.cmake +++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake @@ -76,7 +76,7 @@ macro(libtool_create_control_file _target) file(WRITE ${_laname} "# ${_lname}.la - a libtool library file\n# Generated by ltmain.sh (GNU libtool) 2.2.6b\n") file(APPEND ${_laname} "dlname=''\n\n") file(APPEND ${_laname} "library_names=''\n\n") - file(APPEND ${_laname} "old_library='${_lname}.a'\n\n") + file(APPEND ${_laname} "old_library='${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}'\n\n") file(APPEND ${_laname} "inherited_linker_flags=''\n\n") file(APPEND ${_laname} "dependency_libs=' ${_target_dependency_libs}'\n\n") file(APPEND ${_laname} "weak_library_names=''\n\n") @@ -89,4 +89,12 @@ macro(libtool_create_control_file _target) file(APPEND ${_laname} "dlpreopen=''\n\n") file(APPEND ${_laname} "libdir=''\n\n") + + # Add custom command to symlink the static library soo that autotools finds the library in .libs + # these are executed after the specified target build. + add_custom_command(TARGET ${_target} POST_BUILD COMMAND + cmake -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/.libs") + add_custom_command(TARGET ${_target} POST_BUILD COMMAND + cmake -E create_symlink ${_target_location} "${CMAKE_CURRENT_SOURCE_DIR}/.libs/${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}") + endmacro()
\ No newline at end of file |