Hi,

On Sat, Jun 01, 2013 at 12:00:04PM -0400, cmake-requ...@cmake.org wrote:
> Date: Fri, 31 May 2013 15:12:10 -0400
> From: Frankie Chan <frankie.c...@ubisoft.com>

Ah, I just realized that I failed to reply to the most current mail ;)


> I get the following error, i am kinda stumped right now since I am not 
> exactly sure if this is the right approach in linking my project.
> 
>   Cannot specify link libraries for target "/usr/lib/libsqlite3.dylib" which
>   is not built by this project.
> 
>   CMake does not support this but it used to work accidentally and is being
>   allowed for compatibility.
> 
>   Policy CMP0016 is not set: target_link_libraries() reports error if only
>   argument is not a target.  Run "cmake --help-policy CMP0016" for policy
>   details.  Use the cmake_policy command to set the policy and suppress this
>   warning.
> This warning is for project developers.  Use -Wno-dev to suppress it.

This can mean (with deadly precision) nothing other than ${Target} having
ended up as an empty expression, thus the sqlite3 argument
(/usr/lib/libsqlite3.dylib) ends up being the *first* argument of the
call which is supposed to be the candidate target instead.
IOW, FUBAR.

Perhaps ${Target} variable has a case sensitivity issue? Scope issue? (perhaps
some outer scope defined it yet now we're in a foreign unrelated scope?
Different directory, different function, ...).

Anyway, always use
message(FATAL_ERROR "exact_same_cmake_line_content_as_executed")
(or, IOW,
message(FATAL_ERROR "target_link_libraries(${Target} ${SQLITE3_LIBRARIES})")
)
whenever needing to analyze why things fail.

Andreas Mohr
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to