Allow linux distros to override LIBDIR; fix xfreerdp install

This commit is contained in:
Mike Gilbert 2011-08-25 00:00:24 -04:00
parent 832c34842c
commit b627dbb35c
10 changed files with 16 additions and 11 deletions

View File

@ -46,6 +46,11 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
# Set default libdir
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
# Compiler-specific flags
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-but-set-variable")
@ -90,7 +95,7 @@ test_big_endian(BIG_ENDIAN)
set(FREERDP_KEYMAP_PATH "${CMAKE_INSTALL_PREFIX}/freerdp/keymaps")
# Path to put plugins
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/lib/freerdp")
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/freerdp")
# Include directories
include_directories(${CMAKE_CURRENT_BINARY_DIR})

View File

@ -52,8 +52,6 @@ if(Xcursor_FOUND)
target_link_libraries(xfreerdp ${Xext_LIBRARIES})
endif()
INSTALL_PROGRAMS(/bin FILES xfreerdp)
target_link_libraries(xfreerdp freerdp-core)
target_link_libraries(xfreerdp freerdp-gdi)
target_link_libraries(xfreerdp freerdp-kbd)
@ -61,3 +59,5 @@ target_link_libraries(xfreerdp freerdp-rail)
target_link_libraries(xfreerdp freerdp-chanman)
target_link_libraries(xfreerdp freerdp-utils)
target_link_libraries(xfreerdp ${X11_LIBRARIES})
install(TARGETS xfreerdp DESTINATION bin)

View File

@ -32,4 +32,4 @@ set_target_properties(freerdp-cache PROPERTIES VERSION ${FREERDP_VERSION_FULL} S
target_link_libraries(freerdp-cache freerdp-utils)
install(TARGETS freerdp-cache DESTINATION lib)
install(TARGETS freerdp-cache DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -26,5 +26,5 @@ add_library(freerdp-chanman SHARED ${FREERDP_CHANMAN_SRCS})
set_target_properties(freerdp-chanman PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
target_link_libraries(freerdp-chanman freerdp-utils)
install(TARGETS freerdp-chanman DESTINATION lib)
install(TARGETS freerdp-chanman DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -105,4 +105,4 @@ endif()
target_link_libraries(freerdp-core ${OPENSSL_LIBRARIES})
target_link_libraries(freerdp-core freerdp-utils)
install(TARGETS freerdp-core DESTINATION lib)
install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -41,4 +41,4 @@ target_link_libraries(freerdp-gdi freerdp-rfx)
set_target_properties(freerdp-gdi PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
install(TARGETS freerdp-gdi DESTINATION lib)
install(TARGETS freerdp-gdi DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -40,5 +40,5 @@ add_definitions(-DKEYMAP_PATH="${FREERDP_KEYMAP_PATH}")
set_target_properties(freerdp-kbd PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
install(TARGETS freerdp-kbd DESTINATION lib)
install(TARGETS freerdp-kbd DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -29,4 +29,4 @@ set_target_properties(freerdp-rail PROPERTIES VERSION ${FREERDP_VERSION_FULL} SO
target_link_libraries(freerdp-rail freerdp-utils)
install(TARGETS freerdp-rail DESTINATION lib)
install(TARGETS freerdp-rail DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -51,4 +51,4 @@ if(WITH_SSE2)
target_link_libraries(freerdp-rfx freerdp-rfx-sse2)
endif()
install(TARGETS freerdp-rfx DESTINATION lib)
install(TARGETS freerdp-rfx DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -54,4 +54,4 @@ if(WIN32)
target_link_libraries(freerdp-utils ws2_32)
endif()
install(TARGETS freerdp-utils DESTINATION lib)
install(TARGETS freerdp-utils DESTINATION ${CMAKE_INSTALL_LIBDIR})