Skip to content

Commit

Permalink
Moved generation of libopen1722custom.so to src/.
Browse files Browse the repository at this point in the history
Signed-off-by: Naresh Nayak <Naresh.Nayak@de.bosch.com>
  • Loading branch information
nayakned committed Dec 20, 2024
1 parent 6fed914 commit 15341a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ add_library(open1722examples STATIC "common/common.c")
target_include_directories(open1722examples PRIVATE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$(CMAKE_CURRENT_SOURCE_DIR))
${CMAKE_CURRENT_SOURCE_DIR})

add_dependencies(examples open1722examples)

Expand Down
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@ target_include_directories(${LIB_NAME} PRIVATE
$<INSTALL_INTERFACE:include>)
set_target_properties(${LIB_NAME} PROPERTIES VERSION ${PROJECT_VERSION})

add_library(${LIB_NAME}custom SHARED)
target_compile_options(${LIB_NAME}custom PRIVATE -Wall -Wextra)
target_include_directories(${LIB_NAME}custom PRIVATE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_target_properties(${LIB_NAME}custom PROPERTIES VERSION ${PROJECT_VERSION})

install(TARGETS ${LIB_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS ${LIB_NAME}custom
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

add_subdirectory(avtp)
10 changes: 1 addition & 9 deletions src/avtp/acf/custom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ set(LIB_NAME "${PROJECT_NAME}custom" )

file(GLOB LIB_SOURCES *.c)

add_library(${LIB_NAME} SHARED ${LIB_SOURCES})
target_compile_options(${LIB_NAME} PRIVATE -Wall -Wextra)
target_include_directories(${LIB_NAME} PRIVATE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_target_properties(${LIB_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
target_sources(${LIB_NAME} PRIVATE ${LIB_SOURCES})

install(TARGETS ${LIB_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

0 comments on commit 15341a6

Please sign in to comment.