Registered Member
|
I am linking my plugin to qqmp qt-based multimedia player. Why cmake puts result in the projects top directory/libs? Her is a part of my makefile:
SET( LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) SET( RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) SET( ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) MESSAGE("LIBRARY OUTPUT DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY}") MESSAGE("ARCHIVE OUTPUT DIRECTORY ${ARCHIVE_OUTPUT_DIRECTORY}") MESSAGE("RUNTIME OUTPUT DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY}") ADD_LIBRARY(qmmpkde4filedialog SHARED ${libqmmpkde4filedialog_SRCS} ${libqmmpkde4filedialog_MOC_SRCS} ) add_dependencies(qmmpkde4filedialog qmmpui) target_link_libraries( qmmpkde4filedialog ${QT_LIBRARIES} -lqmmpui ${KDE4_KIO_LIBS} -lkio ) install(TARGETS qmmpkde4filedialog DESTINATION ${LIB_DIR}/qmmp/FileDialogs) Well MESSAGE( ... prints my current source directory, and I wont the resulting lib to be placed there, but why it goes elsewhere? Thanks in advance.
People are the power
|
Administrator
|
All libraries are placed in BUILD_DIR/libs. This is so within project linking can be done easily by CMake. You should only be concerned with the location where libraries are installed.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
While the reply likely was fully correct, it didn't quite tell the whole story:
Your LIBRARY_OUTPUT_DIRECTORY variable has the same _name_ as the _property_ to be set on a target (via set_property()). That, however, doesn't help much (in fact it's completely bogus since this variable isn't hooked up anywhere), since I guess what you really would have wanted is the builtin CMAKE_LIBRARY_OUTPUT_DIRECTORY variable for the _global_ setting, i.e. to affect output directory of _all_ targets. IOW, _either_ set the LIBRARY_OUTPUT_DIRECTORY target property (_per-target_), such as: set_property(TARGET ... PROPERTY LIBRARY_OUTPUT_DIRECTORY ... ) or some such, or: set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ....) |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell