diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 0400baa..8cb395f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -31,7 +31,7 @@ add_library(open1722examples STATIC "common/common.c") target_include_directories(open1722examples PRIVATE $ $ - $(CMAKE_CURRENT_SOURCE_DIR)) + ${CMAKE_CURRENT_SOURCE_DIR}) add_dependencies(examples open1722examples) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 00c00f8..b74cc2c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,8 +38,18 @@ target_include_directories(${LIB_NAME} PRIVATE $) 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 + $ + $) +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) \ No newline at end of file diff --git a/src/avtp/acf/custom/CMakeLists.txt b/src/avtp/acf/custom/CMakeLists.txt index 6fc1885..0e6b26d 100644 --- a/src/avtp/acf/custom/CMakeLists.txt +++ b/src/avtp/acf/custom/CMakeLists.txt @@ -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 - $ - $) -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})