diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-10-06 14:29:54 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-10-06 14:56:22 +0200 |
commit | c27f5da1b789aa8aaf952d74e0562db50691b23a (patch) | |
tree | 2b93f8ab87e035f13c511118e5544ad6fb35f5c2 /cmake | |
parent | 36304753691c36f6a75d341545ad6ebb9e859362 (diff) | |
download | tigervnc-c27f5da1b789aa8aaf952d74e0562db50691b23a.tar.gz tigervnc-c27f5da1b789aa8aaf952d74e0562db50691b23a.zip |
Avoid getting LOCATION property
It's not supported in newer CMake, so try to deduce the library
filename from the target name.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/CMakeMacroLibtoolFile.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake index c882c4ad..1a3ab7cc 100644 --- a/cmake/Modules/CMakeMacroLibtoolFile.cmake +++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake @@ -1,5 +1,4 @@ macro(libtool_create_control_file _target) - get_target_property(_target_location ${_target} LOCATION) get_target_property(_target_type ${_target} TYPE) message("-- Creating static libtool control file for target ${_target}") @@ -113,7 +112,7 @@ macro(libtool_create_control_file _target) endforeach() # Write the libtool control file for the static library - get_filename_component(_lname ${_target_location} NAME_WE) + set(_lname ${CMAKE_STATIC_LIBRARY_PREFIX}${_target}) set(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_lname}.la) file(WRITE ${_laname} "# ${_lname}.la - a libtool library file\n# Generated by ltmain.sh (GNU libtool) 2.2.6b\n") @@ -142,6 +141,6 @@ macro(libtool_create_control_file _target) add_custom_command(TARGET ${_target} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/.libs") add_custom_command(TARGET ${_target} POST_BUILD COMMAND - "${CMAKE_COMMAND}" -E create_symlink ${_target_location} "${CMAKE_CURRENT_BINARY_DIR}/.libs/${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}") + "${CMAKE_COMMAND}" -E create_symlink ../${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX} "${CMAKE_CURRENT_BINARY_DIR}/.libs/${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}") endmacro() |