CMake options for custom local OPENCV_SRC_DIR#170
Conversation
There was a problem hiding this comment.
Can you expose this variable so that an interactive ccmake/cmake-gui shows these options?
http://stackoverflow.com/questions/8709877/cmake-string-options
Should be enough to add something like this to the top of the file (untested):
set(OPENCV_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/opencv" CACHE STRING "Directory where the OpenCV sources are")
|
Basically I'm happy to take this in, but see the two comments to make it easier to discover and set these options via |
|
I need to double check that the cache set of OPENCV_SRC_DIR can still be overriden - think I may be running into issues now |
install OpenCV headers when using local OpenCV
|
Ok, let me know when you have verified that it works for you. Also you might need rebasing, as I just merged #171 from you which touches some lines that this one touches too. |
|
I may have rebased this wrong - but the diff is right. Let me know if something looks off. |
|
@thp , if you have time, can you please take a look at this and merge it if appropriate? I need it merged in before I can rebase for my MSVC2013 changes. |
|
I've squashed the commits and merged it now. |
|
Edit: Tag @birarda Sorry to revive this old PR, but what do you mean by 'in-source build'? From the changes you made to CMakeLists.txt, it seems like 'in-source build' just means that you built into the root folder, not a build folder, even though using a build directory is recommended by the OpenCV docs. Should 'in-source-build' really be supported? I bring this up again because I'm reworking the CMakeLists files and I wanted to know the reason for including this in the first place. I understand you want to re-use an OpenCV that you already have, but why did you build in source? |
|
Hey @cboulay sorry for my delayed reply to this - we're actually not using I was building |
These are a couple of changes we needed to more easily use PSMoveAPI as an external project with CMake.
The OpenCV changes should not affect any existing builds - they allow a caller to specify
OPENCV_SRC_DIRto have the PSMoveAPI CMakeLists.txt look elsewhere for OpenCV. You can also specify is OpenCV was built using an in-source build usingOPENCV_BUILT_IN_SOURCE.