aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 4 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e52b25b..160d787 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,23 +12,6 @@ include(Macros)
12option(BUILD_SHARED_LIBS "shared/static libs" ON) 12option(BUILD_SHARED_LIBS "shared/static libs" ON)
13option(BUILD_TESTS "tests?" OFF) 13option(BUILD_TESTS "tests?" OFF)
14 14
15if(WIN32 AND NOT CMAKE_HOST_WIN32 AND CMAKE_CROSSCOMPILING AND BUILD_TESTS)
16 add_auto_option(ENABLE_WINE "Enable running tests with wine" AUTO)
17 find_program(WINE_EXECUTABLE wine)
18 check_auto_option(ENABLE_WINE "wine support" WINE_EXECUTABLE "wine executable")
19 if(ENABLE_WINE AND WINE_EXECUTABLE)
20 set(WRAPPER ${WINE_EXECUTABLE})
21 set(RUN_TESTS 1)
22 message(STATUS "Support to run cross compiled tests - enabled")
23 endif()
24elseif(BUILD_TESTS)
25 set(RUN_TESTS 1)
26endif()
27
28if(RUN_TESTS)
29 enable_testing()
30endif()
31
32set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) 15set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
33set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) 16set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
34set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 17set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
@@ -44,5 +27,9 @@ if(WIN32)
44endif() 27endif()
45 28
46if (BUILD_TESTS) 29if (BUILD_TESTS)
30 if (CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
31 message(WARNING "You might want to set CMAKE_CROSSCOMPILING_EMULATOR to wine path in order to run tests")
32 endif ()
33 enable_testing()
47 add_subdirectory(tests) 34 add_subdirectory(tests)
48endif() 35endif()