Skip to content
Snippets Groups Projects
Commit 47633685 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix libsgm find_package script to find it

parent 50345eda
No related branches found
No related tags found
No related merge requests found
...@@ -6,16 +6,25 @@ ...@@ -6,16 +6,25 @@
# LIBSGM_INCLUDE_DIRS - Directories containing the LIBSGM include files. # LIBSGM_INCLUDE_DIRS - Directories containing the LIBSGM include files.
# LIBSGM_LIBRARY - Libraries needed to use LIBSGM. # 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 # Find lib
set(LIBSGM_FOUND FALSE CACHE BOOL "" FORCE) set(LIBSGM_FOUND FALSE CACHE BOOL "" FORCE)
find_library(LIBSGM_LIBRARY find_library(LIBSGM_LIBRARY
NAMES sgm libsgm NAMES sgm libsgm
PATHS ${libSGM_DIR}
PATH_SUFFIXES lib/ PATH_SUFFIXES lib/
) )
# Find include # Find include
find_path(LIBSGM_INCLUDE_DIRS find_path(LIBSGM_INCLUDE_DIRS
NAMES libsgm.h NAMES libsgm.h
PATHS ${libSGM_DIR}
PATH_SUFFIXES include/ PATH_SUFFIXES include/
) )
...@@ -27,6 +36,7 @@ message(STATUS "(LIBSGM_FOUND : ${LIBSGM_FOUND} include: ${LIBSGM_INCLUDE_DIRS}, ...@@ -27,6 +36,7 @@ message(STATUS "(LIBSGM_FOUND : ${LIBSGM_FOUND} include: ${LIBSGM_INCLUDE_DIRS},
mark_as_advanced(LIBSGM_FOUND) mark_as_advanced(LIBSGM_FOUND)
if(LIBSGM_FOUND) if(LIBSGM_FOUND)
include_directories(${LIBSGM_INCLUDE_DIRS})
set(LIBSGM_FOUND TRUE CACHE BOOL "" FORCE) set(LIBSGM_FOUND TRUE CACHE BOOL "" FORCE)
set(LIBSGM_LIBRARIES ${LIBSGM_LIBRARY}) set(LIBSGM_LIBRARIES ${LIBSGM_LIBRARY})
message(STATUS "LibSGM found ( include: ${LIBSGM_INCLUDE_DIRS}, lib: ${LIBSGM_LIBRARY})") message(STATUS "LibSGM found ( include: ${LIBSGM_INCLUDE_DIRS}, lib: ${LIBSGM_LIBRARY})")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment