| 1 | set(SOURCES |
| 2 | SimpleTests.cpp |
| 3 | UnitTests.cpp |
| 4 | MountTests.cpp |
| 5 | NetworkTests.cpp |
| 6 | Plan9Tests.cpp |
| 7 | DrvFsTests.cpp |
| 8 | FilesystemUnitTests.cpp |
| 9 | StringUnitTests.cpp |
| 10 | Common.cpp |
| 11 | PluginTests.cpp |
| 12 | PolicyTests.cpp |
| 13 | InstallerTests.cpp |
| 14 | WSLCTests.cpp |
| 15 | WslcSdkTests.cpp |
| 16 | WslcSdkWinRtTests.cpp |
| 17 | WindowsUpdateTests.cpp) |
| 18 | |
| 19 | set(HEADERS |
| 20 | Common.h |
| 21 | PluginTests.h |
| 22 | lxsstest.h) |
| 23 | |
| 24 | add_compile_definitions(INLINE_TEST_METHOD_MARKUP) |
| 25 | |
| 26 | add_library(wsltests SHARED ${SOURCES} ${HEADERS}) |
| 27 | |
| 28 | target_include_directories(wsltests PRIVATE |
| 29 | ${CMAKE_SOURCE_DIR}/src/windows/WslcSDK |
| 30 | ${CMAKE_BINARY_DIR}/src/windows/WslcSDK/winrt/${TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}) |
| 31 | set_property(SOURCE NetworkTests.cpp APPEND PROPERTY INCLUDE_DIRECTORIES |
| 32 | ${CMAKE_SOURCE_DIR}/src/windows/service/exe) |
| 33 | target_link_directories(wsltests PRIVATE ${BIN}) |
| 34 | target_precompile_headers(wsltests REUSE_FROM common) |
| 35 | target_link_libraries(wsltests |
| 36 | common |
| 37 | wslclib |
| 38 | wslcsdk |
| 39 | ${TAEF_LINK_LIBRARIES} |
| 40 | ${COMMON_LINK_LIBRARIES} |
| 41 | ${MSI_LINK_LIBRARIES} |
| 42 | ${HCS_LINK_LIBRARIES} |
| 43 | yaml-cpp |
| 44 | ${SERVICE_LINK_LIBRARIES} |
| 45 | VirtDisk.lib |
| 46 | Wer.lib |
| 47 | Dbghelp.lib |
| 48 | sfc.lib |
| 49 | Crypt32.lib |
| 50 | Ncrypt.lib) |
| 51 | |
| 52 | add_dependencies(wsltests wslserviceidl wslclib wslc wslcsdk wslcsdkwinrtidl) |
| 53 | add_subdirectory(testplugin) |
| 54 | add_subdirectory(wslc) |
| 55 | |
| 56 | # For prettier source tree browsing |
| 57 | source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES} ${HEADERS}) |