[CMake] need help fixing warning message... 3.0

J Decker d3ck0r at gmail.com
Tue May 27 05:10:16 EDT 2014


These result from the libraries resulting from the built sources, not from
the sysroot libs or things discovered with find packages.


On Tue, May 27, 2014 at 1:37 AM, Hendrik Sattler <post at hendrik-sattler.de>wrote:

> Can this be solved with CMAKE_STAGING_PREFIX or CMAKE_SYSROOT in CMake 3.0?
> From the documentation, it looks like to have exactly this purpose.
>
>
> On 26. Mai 2014 23:06:51 MESZ, J Decker <d3ck0r at gmail.com> wrote:
>>
>> if it exists as a target; I need to know the path to the built library
>> for subsequent projects to link against.  I have to manually add the option
>> -L<path to build library) -lbaselibname to avoid having the full path
>> linked into the resulting .so.
>>
>> if I just use 'add_link_library' then the resulting library will not load
>> except on the system that built it, because the library name references
>> contain paths to the libs not just the libname.
>>
>>
>>
>>
>> On Mon, May 26, 2014 at 1:49 PM, Hendrik Sattler <post at hendrik-sattler.de
>> > wrote:
>>
>>> Maybe you can explain _why_ you need to do it this way? Can it be solved
>>> more inline with the better cross-compile support in cmake-3.0?
>>>
>>> On 26. Mai 2014 19:29:20 MESZ, J Decker <d3ck0r at gmail.com> wrote:
>>>
>>>>  So... no alternatives to location in this instance?
>>>>
>>>>
>>>> On Sat, May 24, 2014 at 7:28 PM, J Decker <d3ck0r at gmail.com> 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
>>>>
>>>>
>>> --
>>> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
>>> gesendet.
>>>
>>> --
>>>
>>> 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
>>>
>>
>> --
>>
>> 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
>>
>>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140527/d936f3bd/attachment.html>


More information about the CMake mailing list