cmake: assorted install path fixes
authorFrederico Cadete <frederico.cadete@awtce.be>
Tue, 21 Jun 2016 13:25:28 +0000 (15:25 +0200)
committerFrederico Cadete <frederico.cadete@awtce.be>
Tue, 21 Jun 2016 13:43:11 +0000 (15:43 +0200)
- Avoid double prefix in PLUGIN_INSTALL_PATH
- Avoid leading "//" in PLUGIN_SEGMENT_INSTALL_PATH - cmake will think
  it's a network directory
- Use installation directory variable in amb-qt installation

Signed-off-by: Frederico Cadete <frederico.cadete@awtce.be>
CMakeLists.txt
plugins/dbus/amb-qt/CMakeLists.txt

index f435b0c..230f3c9 100644 (file)
@@ -24,10 +24,10 @@ add_definitions(-DPROJECT_SERIES="${PROJECT_SERIES}")
 
 set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
 set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" )
-set (PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
+set (PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
 set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
 set (DOC_INSTALL_DIR "${CMAKE_INSTALL_DOCDIR}/${PROJECT_SERIES}")
-set (PLUGIN_SEGMENT_INSTALL_PATH "/${CMAKE_INSTALL_SYSCONFDIR}/ambd/plugins.d")
+set (PLUGIN_SEGMENT_INSTALL_PATH "${CMAKE_INSTALL_SYSCONFDIR}/ambd/plugins.d")
 
 option(qtmainloop "Use QCoreApplication mainloop " OFF)
 option(websocket_plugin "websocket source and sink plugins" OFF)
index a1ae739..2a17406 100644 (file)
@@ -30,7 +30,7 @@ target_link_libraries(ambqtquick amb-qt ${QT_LIBRARIES} -L${CMAKE_CURRENT_BINARY
 add_executable(ambtestclient test.cpp)
 target_link_libraries(ambtestclient amb amb-qt ${QT_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${gio_LIBRARIES})
 
-install (TARGETS amb-qt LIBRARY DESTINATION lib${LIB_SUFFIX})
+install (TARGETS amb-qt LIBRARY DESTINATION ${LIB_INSTALL_DIR})
 
 install (FILES ${ambqt_headers} DESTINATION ${INCLUDE_INSTALL_DIR}/ COMPONENT Devel)
 install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/qmldir DESTINATION ${LIB_INSTALL_DIR}/qt5/qml/amb COMPONENT Devel)