diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-09 19:58:30 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-09 19:58:30 +0200 |
commit | 2884c56b066fcafb4f0042799f8a16ea3b238d2a (patch) | |
tree | 9c30844807e8ab5f48a17773d19e5b565cb1a59d /mwe/dynlink/exec | |
parent | 5f84969c851530ebc430be2cf8e99c945ff7a4a7 (diff) | |
parent | 08d0b07c19edfe8c81dfe4e21c0d4c1ef128b628 (diff) |
merge with master
Diffstat (limited to 'mwe/dynlink/exec')
-rw-r--r-- | mwe/dynlink/exec/CMakeLists.txt | 10 | ||||
-rw-r--r-- | mwe/dynlink/exec/main.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/mwe/dynlink/exec/CMakeLists.txt b/mwe/dynlink/exec/CMakeLists.txt index 5335f0f..465b45e 100644 --- a/mwe/dynlink/exec/CMakeLists.txt +++ b/mwe/dynlink/exec/CMakeLists.txt @@ -5,12 +5,20 @@ set(CMAKE_CXX_STANDARD 20) project(main C CXX) +add_executable(main main.c) + # Since we have the source code for the test library, we might as well let # CMake use it so it automatically picks up the interface headers and compiles # the library for us. The same can be achieved manually, but is more code. add_subdirectory(../lib test) -add_executable(main main.c) +# include(ExternalProject) +# ExternalProject_Add(test_ext +# SOURCE_DIR ../../lib +# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX="${CMAKE_BINARY_DIR}/ext" +# ) +# add_dependencies(main test_ext) +# find_package(test REQUIRED) # Make sure ld.so (linux) looks in the same folder as the final executable for # the .so dependency diff --git a/mwe/dynlink/exec/main.c b/mwe/dynlink/exec/main.c index 2bbdc20..ff884f2 100644 --- a/mwe/dynlink/exec/main.c +++ b/mwe/dynlink/exec/main.c @@ -1,4 +1,4 @@ -#include <lib.h> +#include <test.h> int main() { library_function(); |