[CMake] MakeFile problem with TARGET_LINK_LIBRARIES andnon-standard 3rd party dyn lib
fbonin.ext at orange-ftgroup.com
fbonin.ext at orange-ftgroup.com
Fri Apr 11 03:28:25 EDT 2008
Of course, This library already exist, it is named
"(...)/path/to/release/darwin/i686/libExternal.dylib" according to darwin convention
Unfortunatly, the build.make generated file
contains the following rule that make "make" believe it have to build this
already existing external library :
"out_source_path/libTEST.dylib : (...)/path/to/release/darwin/i686/External
If I "manually" remove this wrong rule from build.make generated file,
"make" successfuly compile an link TEST shared library.
This means that generated link command is well formed while dependancy rules are not.
-----Message d'origine-----
De : cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] De la part de Alexander Neundorf
Envoyé : jeudi 10 avril 2008 22:44
À : cmake at cmake.org
Objet : Re: [CMake] MakeFile problem with TARGET_LINK_LIBRARIES andnon-standard 3rd party dyn lib
On Thursday 10 April 2008, fbonin.ext at orange-ftgroup.com wrote:
> Hello,
>
...
> PROJECT (TEST)
>
> SET(TEST_MODULE_SRCS "whatever.cpp")
> SOURCE_GROUP(src FILES ${TEST_MODULE_SRCS})
>
> SET(TEST_MODULE_HDRS"whatever.h")
> SOURCE_GROUP(inc FILES ${TEST_MODULE_HDRS})
>
> ADD_LIBRARY(TEST SHARED ${TEST_MODULE_SRCS} ${TEST_MODULE_HDRS}
>
> #add an External non-standard library depandency, located somewhere :
> IF(WIN32)
> TARGET_LINK_LIBRARIES(
> TEST
> debug ${CMAKE_SOURCE_DIR}/path/to/debug/win32/External
> optimized ${CMAKE_SOURCE_DIR}/path/to/release/win32/External )
> ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") TARGET_LINK_LIBRARIES(
> TEST debug ${CMAKE_SOURCE_DIR}/path/to/debug/darwin/i686/External
> optimized ${CMAKE_SOURCE_DIR}/path/to/release/darwin/i686/External )
> ENDIF(WIN32)
> ----------------------------------------------------------------------
> --
> --------
>
> this cmakelist.txt works well for "Visual Studio 8 2005" and "XCode"
> targets
>
> but for "Unix Makefiles" it generate a wrong dependancy rule that I
> finaly found in "build.make" generated file :
>
> "out_source_path/libTEST.dylib :
> (...)/path/to/release/darwin/i686/External"
>
> obviously, make don't now how to build
> "(...)/path/to/release/darwin/i686/External"
Why does it want to build it, i.e. doesn't this library exist ?
Alex
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list