Skip to content

Commit

Permalink
cleanup(scap,sinsp): remove all references to userspace/common
Browse files Browse the repository at this point in the history
Signed-off-by: Grzegorz Nosek <[email protected]>
  • Loading branch information
gnosek authored and poiana committed Nov 2, 2023
1 parent dfb2a15 commit 129a62c
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 24 deletions.
11 changes: 1 addition & 10 deletions cmake/modules/libscap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ else()
message(STATUS "No strlcat found, will use local definition")
endif()

include_directories(${PROJECT_BINARY_DIR}/common)

add_definitions(-DPLATFORM_NAME="${CMAKE_SYSTEM_NAME}")

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
Expand All @@ -57,8 +55,7 @@ else()
endif()

get_filename_component(LIBSCAP_INCLUDE_DIR ${LIBSCAP_DIR}/userspace/libscap ABSOLUTE)
get_filename_component(LIBSCAP_COMMON_INCLUDE_DIR ${LIBSCAP_DIR}/userspace/common ABSOLUTE)
set(LIBSCAP_INCLUDE_DIRS ${LIBSCAP_INCLUDE_DIR} ${LIBSCAP_COMMON_INCLUDE_DIR} ${PROJECT_BINARY_DIR}/libscap ${DRIVER_CONFIG_DIR})
set(LIBSCAP_INCLUDE_DIRS ${LIBSCAP_INCLUDE_DIR} ${PROJECT_BINARY_DIR}/libscap ${DRIVER_CONFIG_DIR})

function(set_scap_target_properties target)
set_target_properties(${target} PROPERTIES
Expand Down Expand Up @@ -137,12 +134,6 @@ install(DIRECTORY "${LIBSCAP_INCLUDE_DIR}" DESTINATION "${CMAKE_INSTALL_INCLUDED
install(DIRECTORY "${DRIVER_CONFIG_DIR}/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/driver"
COMPONENT "scap"
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY "${LIBSCAP_DIR}/userspace/common" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace"
COMPONENT "scap"
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY "${PROJECT_BINARY_DIR}/common" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace"
COMPONENT "scap"
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY "${LIBSCAP_DIR}/userspace/plugin" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace"
COMPONENT "scap"
FILES_MATCHING PATTERN "*.h")
Expand Down
5 changes: 1 addition & 4 deletions cmake/modules/libsinsp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ include(valijson)
include(re2)
include(tinydir)

set(LIBSINSP_INCLUDE_DIRS ${LIBSINSP_DIR}/userspace/libsinsp ${LIBSINSP_DIR}/userspace/common ${LIBSCAP_INCLUDE_DIRS} ${DRIVER_CONFIG_DIR})
set(LIBSINSP_INCLUDE_DIRS ${LIBSINSP_DIR}/userspace/libsinsp ${LIBSCAP_INCLUDE_DIRS} ${DRIVER_CONFIG_DIR})
if(WITH_CHISEL)
list(APPEND LIBSINSP_INCLUDE_DIRS ${LIBSINSP_DIR}/userspace/chisel)
endif()
Expand Down Expand Up @@ -102,9 +102,6 @@ install(DIRECTORY "${LIBSINSP_DIR}/userspace/libsinsp" DESTINATION "${CMAKE_INST
PATTERN "*doxygen*" EXCLUDE
PATTERN "*scripts*" EXCLUDE
PATTERN "*test*" EXCLUDE)
install(DIRECTORY "${LIBSINSP_DIR}/common" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}"
COMPONENT "sinsp"
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY "${LIBSINSP_DIR}/userspace/async" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace"
COMPONENT "sinsp"
FILES_MATCHING PATTERN "*.h")
Expand Down
1 change: 0 additions & 1 deletion test/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ set(DRIVERS_TEST_SOURCES

set(DRIVERS_TEST_INCLUDE
PRIVATE
../../userspace/common
"${GTEST_INCLUDE}"
"${LIBSCAP_DIR}/driver/"
"${LIBSCAP_INCLUDE_DIRS}"
Expand Down
1 change: 0 additions & 1 deletion userspace/libscap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../common")
include_directories("${PROJECT_BINARY_DIR}/libscap")

include(engine_config)
Expand Down
1 change: 0 additions & 1 deletion userspace/libscap/examples/01-open/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_directories("../../../common")
include_directories("../../")

add_executable(scap-open
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_directories("../../../common")
include_directories("../..")

add_executable(scap-validatebuffer
Expand Down
2 changes: 1 addition & 1 deletion userspace/libscap/libscap.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Description: lib for System CAPture
Version: @FALCOSECURITY_LIBS_VERSION@

Libs: -L${libdir}/@LIBS_PACKAGE_NAME@ @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/libscap -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/common
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/libscap
1 change: 0 additions & 1 deletion userspace/libsinsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# limitations under the License.
#
include_directories(./)
include_directories(../common)
include_directories(${LIBSCAP_INCLUDE_DIRS})
include_directories(../async)
include_directories(./include)
Expand Down
2 changes: 0 additions & 2 deletions userspace/libsinsp/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ target_link_libraries(sinsp-example
sinsp
)

target_include_directories(sinsp-example PRIVATE "${CMAKE_SOURCE_DIR}/userspace/common")

if (EMSCRIPTEN)
target_compile_options(sinsp-example PRIVATE "-sDISABLE_EXCEPTION_CATCHING=0")
target_link_options(sinsp-example PRIVATE "-sDISABLE_EXCEPTION_CATCHING=0")
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/libsinsp.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Version: @FALCOSECURITY_LIBS_VERSION@

Requires: libscap
Libs: -L${libdir}/@LIBS_PACKAGE_NAME@ -lsinsp @SINSP_PKG_CONFIG_LIBDIRS@ @SINSP_PKG_CONFIG_LIBS@
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/common @SINSP_PKG_CONFIG_INCLUDES@
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/userspace/libsinsp @SINSP_PKG_CONFIG_INCLUDES@
1 change: 0 additions & 1 deletion userspace/libsinsp/sinsp_debug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_directories("../../../common")
include_directories("../../")

add_executable(sinsp-debug
Expand Down

0 comments on commit 129a62c

Please sign in to comment.