Skip to content

Commit

Permalink
update: sysdig dir gate in subdirectories
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Fontana <lo@linux.com>

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
  • Loading branch information
fntlnz and leodido committed Jul 3, 2019
1 parent e688ab7 commit 19c1204
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
configure_file(debian/postinst.in debian/postinst)
configure_file(debian/prerm.in debian/prerm)

if(NOT SYSDIG_DIR)
set(SYSDIG_DIR "${PROJECT_SOURCE_DIR}/../sysdig")
endif()

file(COPY "${PROJECT_SOURCE_DIR}/scripts/debian/falco"
DESTINATION "${PROJECT_BINARY_DIR}/scripts/debian")

Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ if(FALCO_BUILD_TESTS)
"${FAKEIT_INCLUDE}"
"${PROJECT_SOURCE_DIR}/userspace/engine")

include(CMakeParseArguments)
include(CTest)
include(Catch)
catch_discover_tests(falco_test)
Expand Down
4 changes: 4 additions & 0 deletions userspace/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

if(NOT SYSDIG_DIR)
set(SYSDIG_DIR "${PROJECT_SOURCE_DIR}/../sysdig")
endif()

set(FALCO_ENGINE_SOURCE_FILES
rules.cpp
falco_common.cpp
Expand Down
9 changes: 6 additions & 3 deletions userspace/falco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
if(NOT SYSDIG_DIR)
set(SYSDIG_DIR "${PROJECT_SOURCE_DIR}/../sysdig")
endif()

configure_file("${PROJECT_SOURCE_DIR}/../sysdig/userspace/sysdig/config_sysdig.h.in" config_sysdig.h)
configure_file("${SYSDIG_DIR}/userspace/sysdig/config_sysdig.h.in" config_sysdig.h)

add_executable(falco
configuration.cpp
Expand All @@ -25,7 +28,7 @@ add_executable(falco
event_drops.cpp
statsfilewriter.cpp
falco.cpp
"${PROJECT_SOURCE_DIR}/../sysdig/userspace/sysdig/fields_info.cpp"
"${SYSDIG_DIR}/userspace/sysdig/fields_info.cpp"
webserver.cpp)

target_include_directories(falco PUBLIC
Expand All @@ -39,7 +42,7 @@ target_include_directories(falco PUBLIC

target_link_libraries(falco falco_engine sinsp)
target_link_libraries(falco
"${LIBYAML_LIB}"
"${LIBYAML_LIB}"
"${YAMLCPP_LIB}"
"${CIVETWEB_LIB}")

Expand Down

0 comments on commit 19c1204

Please sign in to comment.