IntelRealSense / RealSenseID

Intel® RealSense™ ID SDK
https://intelrealsense.com/facial-authentication/
Apache License 2.0
98 stars 57 forks source link

Fix build as a subproject in other projects #68

Closed michalrudowicz closed 3 years ago

michalrudowicz commented 3 years ago

Right now trying to use this project as a subproject in other projects (using add_subdirectory in CMake) fails, as CMAKE_BINARY_DIR points to the main project's binary dir instead of RealSenseID's binary dir. This doesn't work when trying to reference files in the 3rdparty directory.

Changed ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} to solve this issue.

Builds with -DRSID_PREVIEW=1 -DRSID_SAMPLES=ON, -DRSID_PREVIEW=1 and with no additional parameters done in my own local environment and passed locally.

cabelo commented 3 years ago

Excellent, I was posting these changes. Thanks.

gabime commented 3 years ago

Merged. Thanks @michalrudowicz .