aboutsummaryrefslogtreecommitdiff
path: root/portmidi/pm_test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'portmidi/pm_test/CMakeLists.txt')
-rw-r--r--portmidi/pm_test/CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/portmidi/pm_test/CMakeLists.txt b/portmidi/pm_test/CMakeLists.txt
new file mode 100644
index 0000000..ae0fe48
--- /dev/null
+++ b/portmidi/pm_test/CMakeLists.txt
@@ -0,0 +1,46 @@
1# CMake file to build tests in this directory: pm_test
2
3# set the build directory to be in portmidi, not in portmidi/pm_test
4# this is required for Xcode:
5if(APPLE)
6set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
7endif(APPLE)
8
9# if(WIN32)
10# if(NOT BUILD_SHARED_LIBS)
11 # /MDd is multithread debug DLL, /MTd is multithread debug
12 # /MD is multithread DLL, /MT is multithread. Change to static:
13# include(../pm_win/static.cmake)
14# endif()
15# endif(WIN32)
16
17if(HAIKU)
18 add_compile_options(-fPIC) # Haiku x86_64 needs this explicitly
19endif()
20
21macro(add_test name)
22 add_executable(${name} ${name}.c)
23 target_link_libraries(${name} PRIVATE portmidi)
24 set_property(TARGET ${name} PROPERTY MSVC_RUNTIME_LIBRARY
25 "MultiThreaded$<$<CONFIG:Debug>:Debug>${MSVCRT_DLL}")
26endmacro(add_test)
27
28add_test(testio)
29add_test(midithread)
30add_test(midithru)
31add_test(sysex)
32add_test(latency)
33add_test(mm)
34add_test(midiclock)
35add_test(qtest)
36add_test(fast)
37add_test(fastrcv)
38add_test(pmlist)
39if(WIN32)
40# windows does not implement Pm_CreateVirtualInput or Pm_CreateVirtualOutput
41else(WIN32)
42add_test(recvvirtual)
43add_test(sendvirtual)
44add_test(multivirtual)
45add_test(virttest)
46endif(WIN32)