From 571f2232d02a154e008d542fee75575b3bae0d8e Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Thu, 17 Aug 2023 11:50:17 +0300 Subject: [PATCH] Fix build --- CMakeLists.txt | 3 +++ flake.lock | 14 +++++++------- source/ec_test.cpp | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23e3ca5..2801de9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ include(cmake/variables.cmake) # ---- Declare library ---- +find_package(ethercat REQUIRED) +link_libraries(ethercat) + add_library( ec-controller_lib OBJECT source/lib.cpp diff --git a/flake.lock b/flake.lock index b77f3bf..5ba9e4b 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1692168099, - "narHash": "sha256-XE9lIQI0aJLZueguR3nYcfe1g839o1xF4MGfPxmdW6M=", + "lastModified": 1692255291, + "narHash": "sha256-JB3M8OvT5QXqbAjVSGOWKm+X7SCxsk7sbAPVQNdlMJo=", "ref": "refs/heads/master", - "rev": "d70c3d00e9d28f0f3816a61779e2454ea3219529", - "revCount": 5, + "rev": "ec418a9f2fb9094be93f2d6870113a388cd62a06", + "revCount": 7, "type": "git", "url": "https://git.dripco.eu/nic/etherlab-nix" }, @@ -72,11 +72,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1691950488, - "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=", + "lastModified": 1692134936, + "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "720e61ed8de116eec48d6baea1d54469b536b985", + "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", "type": "github" }, "original": { diff --git a/source/ec_test.cpp b/source/ec_test.cpp index 1505557..c7c4539 100644 --- a/source/ec_test.cpp +++ b/source/ec_test.cpp @@ -254,7 +254,7 @@ void stack_prefault(void) /****************************************************************************/ //int main(int argc, char **argv) -int main_loop(int argc, char **argv) +int main_loop() { ec_slave_config_t *sc; struct timespec wakeup_time;