cmake: fix try_compile directory

It is required for proper work of toolchains
pull/814/head
Alexander Alekhin 9 years ago
parent e8c109bf40
commit 3d43e7eb21
  1. 2
      modules/sfm/CMakeLists.txt

@ -12,7 +12,7 @@ endif()
if((gflags_FOUND OR GFLAGS_FOUND) AND (glog_FOUND OR GLOG_FOUND))
set(_fname "${CMAKE_CURRENT_BINARY_DIR}/test_sfm_deps.cpp")
file(WRITE "${_fname}" "#include <glog/logging.h>\n#include <gflags/gflags.h>\nint main() { (void)(0); return 0; }\n")
try_compile(SFM_DEPS_OK "${CMAKE_CURRENT_BINARY_DIR}" "${_fname}"
try_compile(SFM_DEPS_OK "${CMAKE_BINARY_DIR}" "${_fname}"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${GLOG_INCLUDE_DIRS};${GFLAGS_INCLUDE_DIRS}"
LINK_LIBRARIES ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES}
OUTPUT_VARIABLE OUTPUT

Loading…
Cancel
Save