Commit 1303c0f8 authored by Jan Möbius's avatar Jan Möbius
Browse files

Don't include HSL_LIBRARY_DIR, if HSL is not there

Added SIFT_GPU and GooglePerfTools finder



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14460 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 315701e7
# - Try to find Google Perftools
# Once done this will define
#
# TCMALLOC_LIBRARY - path to libtcmalloc.so
# PROFILER_LIBRARY - path to libprofiler.so
# GOOGLEPERFTOOLS_FOUND - system has UTIL
# GOOGLEPERFTOOLS_INCLUDE_DIR - the UTIL include directory
# GOOGLEPERFTOOLS_LIBRARY - Link these to use UTIL
# GOOGLEPERFTOOLS_LIBRARY_DIR - Library DIR of UTIL
FIND_LIBRARY( TCMALLOC_LIBRARY tcmalloc
/usr/local/lib
/usr/lib
)
FIND_LIBRARY( PROFILER_LIBRARY profiler
/usr/local/lib
/usr/lib
)
FIND_PATH( GOOGLEPERFTOOLS_LIBRARY_DIR libtcmalloc_and_profiler.so
/usr/local/lib
/usr/lib/
)
FIND_PATH( GOOGLEPERFTOOLS_INCLUDE_DIR google/heap-profiler.h
/usr/local/include
/usr/include
)
IF ( TCMALLOC_LIBRARY AND PROFILER_LIBRARY AND GOOGLEPERFTOOLS_INCLUDE_DIR AND GOOGLEPERFTOOLS_LIBRARY_DIR )
SET( GOOGLEPERFTOOLS_FOUND "YES" )
SET( GOOGLEPERFTOOLS_LIBRARY ${TCMALLOC_LIBRARY} ${PROFILER_LIBRARY} )
ENDIF ( TCMALLOC_LIBRARY AND PROFILER_LIBRARY AND GOOGLEPERFTOOLS_INCLUDE_DIR AND GOOGLEPERFTOOLS_LIBRARY_DIR )
IF ( GOOGLEPERFTOOLS_FOUND )
ELSE ( GOOGLEPERFTOOLS_FOUND )
MESSAGE( AUTHOR_WARNING "Could not find g(oogle-)perftools library.
TCMALLOC_LIBRARY: ${TCMALLOC_LIBRARY},
PROFILER_LIBRARY: ${PROFILER_LIBRARY},
GOOGLEPERFTOOLS_LIBRARY_DIR: ${GOOGLEPERFTOOLS_LIBRARY_DIR}
GOOGLEPERFTOOLS_INCLUDE_DIR: ${GOOGLEPERFTOOLS_INCLUDE_DIR}
GOOGLEPERFTOOLS_LIBRARY: ${GOOGLEPERFTOOLS_LIBRARY}
")
ENDIF ( GOOGLEPERFTOOLS_FOUND )
MARK_AS_ADVANCED(
GOOGLEPERFTOOLS_LIBRARY
GOOGLEPERFTOOLS_LIBRARY_DIR
GOOGLEPERFTOOLS_INCLUDE_DIR
)
......@@ -71,13 +71,14 @@ ELSE( WIN32 )
)
IF( IPOPT_HSL_LIBRARY_DIR)
message ( "IPOPT_HSL_LIBRARY_DIR found at ${IPOPT_HSL_LIBRARY_DIR} ")
set(IPOPT_LIBRARY_DIR ${IPOPT_HSL_LIBRARY_DIR})
LIST( APPEND IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}")
ENDIF(IPOPT_HSL_LIBRARY_DIR)
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
set(IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}")
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
......
# - Try to find SiftGPU
# Once done this will define
#
# SIFTGPU_FOUND - system has UTIL
# SIFTGPU_INCLUDE_DIR - the UTIL include directory
# SIFTGPU_LIBRARY - Link these to use UTIL
# SIFTGPU_LIBRARY_DIR - Library DIR of UTIL
#
IF (SIFTGPU_INCLUDE_DIR)
# Already in cache, be silent
SET(SIFT_GPU_FIND_QUIETLY TRUE)
ENDIF (SIFTGPU_INCLUDE_DIR)
if( WIN32 )
# TODO: find out which directory to reference here
set( LIBDIR lib )
elseif( UNIX )
set( LIBDIR bin )
elseif( APPLE )
set( LIBDIR bin )
endif()
FIND_PATH( SIFTGPU_INCLUDE_DIR SiftGPU/SiftGPU.h PATHS "${CMAKE_SOURCE_DIR}/../SiftGPU/src" )
if( SIFTGPU_INCLUDE_DIR )
set( SIFTGPU_FOUND TRUE )
set( SIFTGPU_LIBRARY_DIR ${SIFTGPU_INCLUDE_DIR}/../${LIBDIR} )
set( SIFTGPU_LIBRARY optimized siftgpu debug siftgpu )
ELSE( SIFTGPU_INCLUDE_DIR )
SET( SIFTGPU_FOUND FALSE )
ENDIF( SIFTGPU_INCLUDE_DIR )
IF ( SIFTGPU_FOUND )
ELSE ( SIFTGPU_FOUND )
MESSAGE( AUTHOR_WARNING "SiftGPU NOT FOUND" )
ENDIF ( SIFTGPU_FOUND )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment