more Transport Manager CMakeList
authorJustin Dickow <jjdickow@gmail.com>
Wed, 23 Jul 2014 17:22:06 +0000 (13:22 -0400)
committerJustin Dickow <jjdickow@gmail.com>
Wed, 23 Jul 2014 17:22:06 +0000 (13:22 -0400)
Signed-off-by: Justin Dickow <jjdickow@gmail.com>
src/components/transport_manager/CMakeLists.txt

index ce7a30e..a581dc8 100644 (file)
@@ -67,7 +67,7 @@ if (BUILD_USB_SUPPORT)
   endif()
 endif(BUILD_USB_SUPPORT)
 
-add_library("TransportManager" ${SOURCES})
+add_library(${target} ${SOURCES})
 
 if (BUILD_USB_SUPPORT)
   if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
@@ -76,13 +76,14 @@ if (BUILD_USB_SUPPORT)
 endif(BUILD_USB_SUPPORT)
 
 if (BUILD_AVAHI_SUPPORT)
-  target_link_libraries ("TransportManager" avahi-common)
+  target_link_libraries(${target} avahi-common)
 endif()
-target_link_libraries ("TransportManager" log4cxx)
-if (BUILD_BT_SUPPORT)
-  target_link_libraries("TransportManager" bluetooth)
+
+if(ENABLE_LOG)
+  add_dependencies(${target} liblog4cxx)
+  target_link_libraries(${target} log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
 endif()
 
-if( BUILD_SHARED_LIBS )
-  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libTransportManager.so DESTINATION lib)
+if (BUILD_BT_SUPPORT)
+  target_link_libraries(${target} bluetooth)
 endif()