aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/CMakeMacroLibtoolFile.cmake5
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()