Commit 5288ef22 authored by Florian Raeth's avatar Florian Raeth

cmake fix

parent 2ca13f74
Pipeline #189128 passed with stages
in 1 minute and 13 seconds
......@@ -6,6 +6,9 @@ cmake_minimum_required (VERSION 2.8)
# Using C++ with flags
set (CMAKE_CXX_FLAGS "-g -std=c++0x")
# Setting project name and description
project(${model.getCompName()})
# Find vsomeip and boost packages
find_package (vsomeip 2.10.0 REQUIRED)
find_package( Boost 1.55 COMPONENTS system thread log REQUIRED )
......@@ -25,9 +28,11 @@ SomeIPAdapter_${model.getEscapedCompName()}.h
list(APPEND LIBRARIES ${model.getEscapedCompName()})
list(APPEND LIBRARIES IAdapter_${model.getEscapedCompName()})
target_link_libraries(SomeIPAdapter_${model.getEscapedCompName()} vsomeip <#noparse>${Boost_LIBRARIES}</#noparse> <#noparse>${LIBRARIES}</#noparse>)
# Adding include directory to a target
target_include_directories(SomeIPAdapter_${model.getEscapedCompName()} PUBLIC <#noparse>${LIBRARIES}</#noparse> <#noparse>${INCLUDE_DIRS}</#noparse> <#noparse>${CMAKE_CURRENT_SOURCE_DIR}</#noparse>)
target_include_directories(SomeIPAdapter_${model.getEscapedCompName()} PUBLIC <#noparse>${INCLUDE_DIRS}</#noparse>)
# Linking libraries to target
target_link_libraries(SomeIPAdapter_${model.getEscapedCompName()} PUBLIC vsomeip <#noparse>${Boost_LIBRARIES}</#noparse> <#noparse>${LIBRARIES}</#noparse>)
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_${model.getEscapedCompName()} FILE SomeIPAdapter_${model.getEscapedCompName()}.cmake)
......@@ -4,6 +4,9 @@ cmake_minimum_required (VERSION 2.8)
# Using C++ with flags
set (CMAKE_CXX_FLAGS "-g -std=c++0x")
# Setting project name and description
project(tests.a.compA)
# Find vsomeip and boost packages
find_package (vsomeip 2.10.0 REQUIRED)
find_package( Boost 1.55 COMPONENTS system thread log REQUIRED )
......@@ -23,9 +26,11 @@ SomeIPAdapter_tests_a_compA.h
list(APPEND LIBRARIES tests_a_compA)
list(APPEND LIBRARIES IAdapter_tests_a_compA)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
# Adding include directory to a target
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${LIBRARIES} ${INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${INCLUDE_DIRS})
# Linking libraries to target
target_link_libraries(SomeIPAdapter_tests_a_compA PUBLIC vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_tests_a_compA FILE SomeIPAdapter_tests_a_compA.cmake)
......@@ -4,6 +4,9 @@ cmake_minimum_required (VERSION 2.8)
# Using C++ with flags
set (CMAKE_CXX_FLAGS "-g -std=c++0x")
# Setting project name and description
project(tests.a.compA)
# Find vsomeip and boost packages
find_package (vsomeip 2.10.0 REQUIRED)
find_package( Boost 1.55 COMPONENTS system thread log REQUIRED )
......@@ -23,9 +26,11 @@ SomeIPAdapter_tests_a_compA.h
list(APPEND LIBRARIES tests_a_compA)
list(APPEND LIBRARIES IAdapter_tests_a_compA)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
# Adding include directory to a target
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${LIBRARIES} ${INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${INCLUDE_DIRS})
# Linking libraries to target
target_link_libraries(SomeIPAdapter_tests_a_compA PUBLIC vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_tests_a_compA FILE SomeIPAdapter_tests_a_compA.cmake)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment