summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/PS3EYEDriver/sdl/CMakeLists.txt
blob: 5064b2d86c17d492a41e8087a47634dc75fe4a0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
set(cmake-modules "${CMAKE_CURRENT_LIST_DIR}/cmake/")
if(MSVC)
    set(CMAKE_MODULE_PATH "${cmake-modules}" ${CMAKE_MODULE_PATH})
else()
    list(APPEND CMAKE_MODULE_PATH "${cmake-modules}")
endif()

find_package(SDL2 QUIET)
if(SDL2_FOUND)
    include_directories(${SDL2_INCLUDE_DIRS})
    link_libraries(${SDL2_LIBRARIES})
    link_libraries(opentrack-ps3eye)
    otr_module(ps3eye-test EXECUTABLE NO-QT WIN32-CONSOLE)
    if(WIN32)
        foreach(k ${SDL2_LIBRARIES})
            get_filename_component(path "${k}" PATH)
            set(lib "${path}/SDL2.dll")
            if(EXISTS "${lib}")
                otr_install_lib("${lib}" "${opentrack-hier-pfx}")
                break()
            endif()
        endforeach()
    endif()
endif()