So... no alternatives to location in this instance?
On Sat, May 24, 2014 at 7:28 PM, J Decker <[email protected]> wrote: > CMake Warning (dev) at > C:/general/build/android/karaway/debug_out/core/DefaultInstall.cmake:203 > (get_property): > Policy CMP0026 is not set: Disallow use of the LOCATION target property. > Run "cmake --help-policy CMP0026" for policy details. Use the > cmake_policy > command to set the policy and suppress this warning. > > The LOCATION property should not be read from target "keypad.isp". Use > the > target name directly with add_custom_command, or use the generator > expression $<TARGET_FILE>, as appropriate. > > Call Stack (most recent call first): > security.null/CMakeLists.txt:23 (my_target_link_libraries) > This warning is for project developers. Use -Wno-dev to suppress it. > > > ------------- > > macro(my_target_link_libraries target ) > if(CMAKE_COMPILER_IS_GNUCC AND __ANDROID__ ) > foreach( target_lib ${ARGN} ) > if( TARGET ${target_lib} ) > get_property( lib_path TARGET ${target_lib} PROPERTY LOCATION) > get_property( existing_outname TARGET ${target_lib} PROPERTY > OUTPUT_NAME ) > if( NOT existing_outname ) > set( existing_outname ${target_lib} ) > endif( NOT existing_outname ) > if( ${lib_path} MATCHES "(.*)/([^/]*)$" ) > get_target_property(existing_link_flags ${target} > LINK_FLAGS) > if(existing_link_flags) > set(new_link_flags "${existing_link_flags} -L > ${CMAKE_MATCH_1} -l ${existing_outname}") > else() > set(new_link_flags "-L ${CMAKE_MATCH_1} -l > ${existing_outname}") > endif() > set_target_properties( ${target} PROPERTIES LINK_FLAGS > ${new_link_flags}) > add_dependencies( ${target} ${target_lib} ) > endif( ${lib_path} MATCHES "(.*)/([^/]*)$" ) > else() > target_link_libraries( ${target} ${target_lib} ) > endif( TARGET ${target_lib} ) > endforeach( target_lib ${ARGN} ) > else() > target_link_libraries( ${target} ${ARGN} ) > endif() > endmacro() > > ---------------------- > In the script I'm getting LOCATION to know if the referenced library is a > full pathname or a short name so I can strip the path appropriately... I > don't think the target_file solution works here, what other alternative is > there? >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
