diff --git a/cv-node/cmake/FindLibSGM.cmake b/cv-node/cmake/FindLibSGM.cmake index ac950c25175cc43df740f5c3ee76e09bce4545e3..35ee75c258510c8e38ac8c4778ac6d665911a818 100644 --- a/cv-node/cmake/FindLibSGM.cmake +++ b/cv-node/cmake/FindLibSGM.cmake @@ -6,16 +6,25 @@ # LIBSGM_INCLUDE_DIRS - Directories containing the LIBSGM include files. # LIBSGM_LIBRARY - Libraries needed to use LIBSGM. +if(WIN32) +find_path(libSGM_DIR libSGM PATHS "C:/Program Files" "C:/Program Files (x86)") +set(libSGM_DIR ${libSGM_DIR}/libSGM) +else() +set(glog_DIR "") +endif() + # Find lib set(LIBSGM_FOUND FALSE CACHE BOOL "" FORCE) find_library(LIBSGM_LIBRARY NAMES sgm libsgm + PATHS ${libSGM_DIR} PATH_SUFFIXES lib/ ) # Find include find_path(LIBSGM_INCLUDE_DIRS NAMES libsgm.h + PATHS ${libSGM_DIR} PATH_SUFFIXES include/ ) @@ -27,6 +36,7 @@ message(STATUS "(LIBSGM_FOUND : ${LIBSGM_FOUND} include: ${LIBSGM_INCLUDE_DIRS}, mark_as_advanced(LIBSGM_FOUND) if(LIBSGM_FOUND) + include_directories(${LIBSGM_INCLUDE_DIRS}) set(LIBSGM_FOUND TRUE CACHE BOOL "" FORCE) set(LIBSGM_LIBRARIES ${LIBSGM_LIBRARY}) message(STATUS "LibSGM found ( include: ${LIBSGM_INCLUDE_DIRS}, lib: ${LIBSGM_LIBRARY})")