diff options
Diffstat (limited to 'portmidi/pm_test/CMakeLists.txt')
| -rw-r--r-- | portmidi/pm_test/CMakeLists.txt | 46 |
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: | ||
| 5 | if(APPLE) | ||
| 6 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) | ||
| 7 | endif(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 | |||
| 17 | if(HAIKU) | ||
| 18 | add_compile_options(-fPIC) # Haiku x86_64 needs this explicitly | ||
| 19 | endif() | ||
| 20 | |||
| 21 | macro(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}") | ||
| 26 | endmacro(add_test) | ||
| 27 | |||
| 28 | add_test(testio) | ||
| 29 | add_test(midithread) | ||
| 30 | add_test(midithru) | ||
| 31 | add_test(sysex) | ||
| 32 | add_test(latency) | ||
| 33 | add_test(mm) | ||
| 34 | add_test(midiclock) | ||
| 35 | add_test(qtest) | ||
| 36 | add_test(fast) | ||
| 37 | add_test(fastrcv) | ||
| 38 | add_test(pmlist) | ||
| 39 | if(WIN32) | ||
| 40 | # windows does not implement Pm_CreateVirtualInput or Pm_CreateVirtualOutput | ||
| 41 | else(WIN32) | ||
| 42 | add_test(recvvirtual) | ||
| 43 | add_test(sendvirtual) | ||
| 44 | add_test(multivirtual) | ||
| 45 | add_test(virttest) | ||
| 46 | endif(WIN32) | ||
