summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander <akutsan@luxoft.com>2018-07-25 15:54:58 +0300
committerAlexander <akutsan@luxoft.com>2018-08-01 17:10:17 +0300
commit1f053a1ef1b6240e18f890959817bcac073a6c7b (patch)
tree1ae76cd1b4aef961b429983802d9bd397f88dcfa
parentc093d6dff1f068c3ee597b8491b4869e5bc23564 (diff)
downloadsdl_core-1f053a1ef1b6240e18f890959817bcac073a6c7b.tar.gz
Set absolute path for linking boost libraries to utils
Specify boost libraries search path for linkage
-rw-r--r--src/appMain/CMakeLists.txt3
-rw-r--r--src/components/hmi_message_handler/test/CMakeLists.txt2
-rw-r--r--src/components/utils/CMakeLists.txt4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index a05f4f97a1..b821c94260 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -141,7 +141,8 @@ add_executable(${PROJECT} ${SOURCES})
if (HMIADAPTER STREQUAL "messagebroker")
add_dependencies(${PROJECT} Boost)
- list(APPEND LIBRARIES libboost_system.so)
+ GET_PROPERTY(BOOST_LIBS_DIRECTORY GLOBAL PROPERTY GLOBAL_BOOST_LIBS)
+ list(APPEND LIBRARIES boost_system -L${BOOST_LIBS_DIRECTORY})
endif()
target_link_libraries(${PROJECT} ${LIBRARIES})
diff --git a/src/components/hmi_message_handler/test/CMakeLists.txt b/src/components/hmi_message_handler/test/CMakeLists.txt
index 9e855c563e..6d30d6ee51 100644
--- a/src/components/hmi_message_handler/test/CMakeLists.txt
+++ b/src/components/hmi_message_handler/test/CMakeLists.txt
@@ -56,7 +56,7 @@ collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" "${EXCLUDE_PATHS}")
if (HMIADAPTER STREQUAL "messagebroker")
GET_PROPERTY(BOOST_LIBS_DIRECTORY GLOBAL PROPERTY GLOBAL_BOOST_LIBS)
- list(APPEND LIBRARIES ${BOOST_LIBS_DIRECTORY}/libboost_system.so)
+ list(APPEND LIBRARIES boost_system -L${BOOST_LIBS_DIRECTORY})
endif()
create_test(hmi_message_handler_test "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt
index 0eb64ae8c2..ed90c6fb45 100644
--- a/src/components/utils/CMakeLists.txt
+++ b/src/components/utils/CMakeLists.txt
@@ -114,7 +114,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
add_library("Utils" ${SOURCES})
-list(APPEND LIBRARIES -lboost_system -lboost_thread)
+GET_PROPERTY(BOOST_LIBS_DIRECTORY GLOBAL PROPERTY GLOBAL_BOOST_LIBS)
+list(APPEND LIBRARIES boost_system -L${BOOST_LIBS_DIRECTORY})
+list(APPEND LIBRARIES boost_thread -L${BOOST_LIBS_DIRECTORY})
target_link_libraries("Utils" ${LIBRARIES})
add_dependencies("Utils" Boost)