[CMake] Multiple libraries, same name...

Bill Hoffman bill.hoffman at kitware.com
Tue Feb 2 08:38:00 EST 2010


Ryan C. Gordon wrote:
> 
> I'm trying to add bindings for various scripting languages to my library 
> PhysicsFS ( http://icculus.org/physfs/ ), and I'm having some trouble.
> 
> Eventually I end up with something like this abbreviated example for the 
> Perl bindings...
> 
>     # This is the actual main library, not the binding.
>     ADD_LIBRARY(physfs SHARED whatever)
> 
>     # This is the binding.
>     ADD_LIBRARY(physfs-perl SHARED "physfs-perl.c")
>     TARGET_LINK_LIBRARIES(physfs-perl physfs)
>     SET_TARGET_PROPERTIES(physfs-perl PROPERTIES OUTPUT_NAME "physfs")
>     INSTALL(TARGETS physfs-perl LIBRARY DESTINATION "${_INSTALLPATH}")
> 

See this property:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LIBRARY_OUTPUT_DIRECTORY


-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573


More information about the CMake mailing list