forked from psmoveservice/psmoveapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified cmake build system and added support files for MSVC2013 x64.…
… Also switched libusb to a submodule. Note that the MSVC build currently does not work with OpenCV3 whereas all other builds do.
- Loading branch information
Showing
119 changed files
with
16,944 additions
and
65,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include/psmove_config.h | ||
build* | ||
bindings/processing | ||
external/opencv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Requirements | ||
------------ | ||
|
||
- Visual Studio Community 2013 | ||
http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx | ||
- CMake | ||
http://www.cmake.org/cmake/resources/software.html | ||
- OpenCV | ||
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ | ||
- Git | ||
http://code.google.com/p/msysgit/ | ||
|
||
1. Clone the PS Move API repository | ||
`git clone --recursive https://github.com/cboulay/psmoveapi.git` | ||
`cd psmoveapi` | ||
|
||
2. Build libusb-1.0 | ||
Open psmoveapi\external\libusb-1.0\msvc\libusb_2013.sln | ||
Change the target to Release x64 (at the top of the Visual Studio window). | ||
Right-click on libusb-1.0 (static) and select Properties. | ||
In the properties Window, make sure the Platform is set to Active or All Platforms. | ||
In the properties Window, navigate to Configuration Properties > C/C++ > Code Generation | ||
Change "Runtime Library" to Multi-threaded DLL (/MD) | ||
Click OK | ||
Right-click on libusb-1.0 (static) and Build. | ||
|
||
3. OpenCV | ||
Still in `psmoveapi/external` | ||
git clone --depth 1 --branch 2.4.11 git://github.com/Itseez/opencv.git | ||
`cd opencv` | ||
`mkdir build` | ||
`cd build` | ||
`cmake .. -G "Visual Studio 12 Win64" -DBUILD_SHARED_LIBS=0 -DBUILD_WITH_STATIC_CRT=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_opencv_apps=OFF -DBUILD_opencv_flann=ON -DBUILD_opencv_features2d=ON -DBUILD_opencv_objdetect=OFF -DBUILD_opencv_photo=OFF -DBUILD_opencv_ts=OFF -DBUILD_opencv_ml=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_java=OFF -DWITH_OPENEXR=OFF -DWITH_FFMPEG=OFF -DWITH_JASPER=OFF -DWITH_TIFF=OFF` | ||
|
||
Open the solution in psmoveapi\external\opencv\build\OpenCV.sln | ||
Change the target to Release (at the top of the Visual Studio window). | ||
Build the solution (Press F7). | ||
|
||
4. Build psmoveapi | ||
|
||
Still in the VS2013 command prompt: | ||
|
||
`cd ..\..\..` | ||
`mkdir build ` | ||
`cd build` | ||
`cmake .. -G "Visual Studio 12 Win64" -DPSMOVE_USE_MADGWICK_AHRS=1 -DPSMOVE_USE_PS3EYE_DRIVER=1` | ||
|
||
Open the `build\Project.sln` solution file. | ||
Change the target to Release. | ||
Build the solution (Press F7). | ||
|
||
5. Read [this Wiki](https://github.com/cboulay/psmove-ue4/wiki) for windows-specific information on pairing and connecting the psmove controller and on using the PS3Eye camera. | ||
|
||
6. Start one of the desired test applications | ||
|
||
If you previously chose to build the example applications (which is the | ||
default), you can then run | ||
|
||
example.exe | ||
|
||
for a basic example. | ||
|
||
For questions, please read the archives of the PS Move Mailing List. If you | ||
cannot find an answer to your question in the archives, send an e-mail: | ||
|
||
https://groups.google.com/forum/#!aboutgroup/psmove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# - Try to find the freetype library | ||
# Once done this defines | ||
# | ||
# LIBUSB_FOUND - system has libusb | ||
# LIBUSB_INCLUDE_DIR - the libusb include directory | ||
# LIBUSB_LIBRARIES - Link these to use libusb | ||
|
||
# Copyright (c) 2006, 2008 Laurent Montel, <[email protected]> | ||
# | ||
# | ||
# Modified on 2015/07/14 by Chadwick Boulay <[email protected]> | ||
# to use static local libraries only. | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
||
|
||
IF (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | ||
|
||
# in cache already | ||
set(LIBUSB_FOUND TRUE) | ||
|
||
ELSE (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | ||
# Because we want to use the static library, | ||
# look locally only. | ||
find_path(LIBUSB_INCLUDE_DIR | ||
NAMES | ||
libusb.h | ||
PATHS | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/libusb | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/libusb-1.0 | ||
/usr/local/include | ||
) | ||
# There are 4 platform-specific ways we might get the libraries. | ||
# 1 - Windows MSVC, download the source, compile with MSVC | ||
# 2 - Windows MSVC, download pre-compiled binaries <- Do not use; wrong CRT library | ||
# 3 - Windows MinGW, download pre-compiled binaries | ||
# 4 - OSX, download the source, build, but do not install | ||
# 5 - OSX, homebrew OR download the source, build, and install | ||
# Each of these puts the compiled library into a different folder | ||
# and that is also architecture-specific. | ||
|
||
set(LIBUSB_LIB_SEARCH_PATH ${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0) | ||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
IF(MINGW) | ||
set(LIBUSB_PLATFORM_PREFIX MinGW) | ||
IF (${CMAKE_C_SIZEOF_DATA_PTR} EQUAL 8) | ||
list(APPEND LIBUSB_LIB_SEARCH_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/MinGW64/static) | ||
#TODO: Add self-compiled folder for MinGW | ||
ELSE() | ||
list(APPEND LIBUSB_LIB_SEARCH_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/MinGW32/static) | ||
#TODO: Add self-compiled folder for MinGW | ||
ENDIF() | ||
ELSE() | ||
IF (${CMAKE_C_SIZEOF_DATA_PTR} EQUAL 8) | ||
list(APPEND LIBUSB_LIB_SEARCH_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/x64/Release/lib) | ||
ELSE() | ||
list(APPEND LIBUSB_LIB_SEARCH_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/Win32/Release/lib) | ||
ENDIF() | ||
set(LIBUSB_PLATFORM_PREFIX MS) | ||
ENDIF() | ||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
list(APPEND LIBUSB_LIB_SEARCH_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/../external/libusb-1.0/libusb/.libs | ||
/usr/local/lib) | ||
ENDIF() | ||
|
||
find_library(LIBUSB_LIBRARIES | ||
NAMES | ||
libusb-1.0.a libusb-1.0.lib libusb-1.0 usb-1.0 usb | ||
PATHS | ||
${LIBUSB_LIB_SEARCH_PATH} | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) | ||
|
||
MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) | ||
|
||
ENDIF (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.