diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2020-11-02 13:06:55 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2020-11-09 09:45:38 +0100 |
commit | 2821345eacb71222ed9acf31f193eda81daeec3f (patch) | |
tree | 27a74ed092adde7cf07aecbbcdd096a7db443cdd /tests | |
parent | 53b1d71abe1c9d7c43eb68b91a0e94a27b948cdf (diff) | |
download | dlfcn-win32-2821345eacb71222ed9acf31f193eda81daeec3f.tar.gz dlfcn-win32-2821345eacb71222ed9acf31f193eda81daeec3f.tar.bz2 dlfcn-win32-2821345eacb71222ed9acf31f193eda81daeec3f.zip |
cmake: add option ENABLE_WINE to enable support for running cross compiled tests with wine
For details about the ENABLE_WINE option, which support three modes
AUTO|ON|OFF see the documentation of cmake macro check_auto_option().
A custom path for the wine executable can be specified by adding
-DWINE_EXECUTABLE=<path> to the cmake command line.
The cmake related macros were copied from
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/modules/Macros.cmake
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 35b6931..5fc6c44 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -12,4 +12,6 @@ set_target_properties(testdll3 PROPERTIES PREFIX "") | |||
12 | 12 | ||
13 | add_executable(t_dlfcn test.c) | 13 | add_executable(t_dlfcn test.c) |
14 | target_link_libraries(t_dlfcn dl) | 14 | target_link_libraries(t_dlfcn dl) |
15 | add_test(NAME t_dlfcn COMMAND $<TARGET_FILE:t_dlfcn> WORKING_DIRECTORY $<TARGET_FILE_DIR:t_dlfcn>) | 15 | if(RUN_TESTS) |
16 | add_test(NAME t_dlfcn COMMAND ${WRAPPER} $<TARGET_FILE:t_dlfcn> WORKING_DIRECTORY $<TARGET_FILE_DIR:t_dlfcn>) | ||
17 | endif() | ||