summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.cmake
blob: 8e3d0420e3ad1e4b0d22fd9dcd0887943e2d44eb (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
25
26
27
set(opentrack-perms PERMISSIONS WORLD_READ WORLD_EXECUTE OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)

if(WIN32)
    install(FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config" DESTINATION .)
endif()

install(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION .)

install(DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty-notices DESTINATION .)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib" DESTINATION .)

install(FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll" DESTINATION . ${opentrack-perms})
install(FILES
    "${CMAKE_SOURCE_DIR}/bin/NPClient.dll"
    "${CMAKE_SOURCE_DIR}/bin/NPClient64.dll"
    "${CMAKE_SOURCE_DIR}/bin/TrackIR.exe"
    DESTINATION .  ${opentrack-perms})

if(APPLE)
    install(CODE "
        execute_process(COMMAND /bin/sh \"${CMAKE_SOURCE_DIR}/macosx/make-app-bundle.sh\"
                                        \"${CMAKE_SOURCE_DIR}/macosx\"
                                        \"${CMAKE_INSTALL_PREFIX}\"
                                        \"${CMAKE_BINARY_DIR}\"
                                        \"${OPENTRACK_COMMIT}\")
    ")
endif()