wangzhengquan
2021-01-22 7e1e05df84d57d2d7c3a622d0ece0d4fe7b1fc8c
src/CMakeLists.txt
@@ -5,7 +5,7 @@
# configure a header file to pass some of the CMake settings
# to the source code
configure_file(BusConfig.h.in BusConfig.h)
configure_file(bus_config.h.in bus_config.h)
add_library(shm_queue 
      logger_factory.cpp
@@ -21,33 +21,26 @@
      socket/net_mod_socket_io.cpp
      socket/net_mod_server_socket.cpp
      bus_error.cpp
      queue/shm_queue_wrapper.cpp
      shm/shm_mm_wrapper.cpp
      shm/mm.cpp
      shm/hashtable.cpp
      px_sem_util.cpp
   )
target_include_directories(shm_queue PUBLIC
                           "${PROJECT_BINARY_DIR}"
                           ${EXTRA_INCLUDES}
                           )
target_include_directories(shm_queue PUBLIC
                                        ${PROJECT_BINARY_DIR}/src
                           ${CMAKE_CURRENT_SOURCE_DIR}
                           ${CMAKE_CURRENT_SOURCE_DIR}/shm
                           ${CMAKE_CURRENT_SOURCE_DIR}/queue
                           ${CMAKE_CURRENT_SOURCE_DIR}/socket
                           )
# state that anybody linking to us needs to include the current source dir
# to find MathFunctions.h, while we don't.
target_include_directories(shm_queue INTERFACE
                                        ${CMAKE_CURRENT_SOURCE_DIR}
                                   ${CMAKE_CURRENT_SOURCE_DIR}/shm
                                   ${CMAKE_CURRENT_SOURCE_DIR}/queue
                                   ${CMAKE_CURRENT_SOURCE_DIR}/socket
                                  )
target_link_libraries(shm_queue PUBLIC  ${EXTRA_LIBS} )
# install rules
install(TARGETS shm_queue DESTINATION lib)