Skip to content

Commit

Permalink
[cmake] using hapi_ROOT to properly find HAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
simogasp committed Oct 16, 2019
1 parent b66f44c commit 8d6f339
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/Modules/FindHAPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
# Look for the header file.
FIND_PATH(HAPI_INCLUDE_DIR NAMES HAPI/HAPI.h
PATHS $ENV{H3D_ROOT}/../HAPI/include
$ENV{hapi_ROOT}/include
../../HAPI/include
${module_file_path}/../../../HAPI/include)
MARK_AS_ADVANCED(HAPI_INCLUDE_DIR)
Expand All @@ -28,17 +29,22 @@ ELSEIF(MSVC80)
SET( HAPI_NAME HAPI_vc8 )
ELSEIF(MSVC90)
SET( HAPI_NAME HAPI_vc9 )
ELSE(MSVC90)
ELSEIF(MSVC90)
SET( HAPI_NAME HAPI )
ELSE()
# for linux and osx the name is hapi
SET(HAPI_NAME hapi)
ENDIF(MSVC70 OR MSVC71)

FIND_LIBRARY(HAPI_LIBRARY NAMES ${HAPI_NAME}
PATHS $ENV{H3D_ROOT}/../lib
$ENV{hapi_ROOT}/lib
../../lib
${module_file_path}/../../../lib)

FIND_LIBRARY( HAPI_DEBUG_LIBRARY NAMES ${HAPI_NAME}_d
PATHS $ENV{H3D_ROOT}/../lib
$ENV{hapi_ROOT}/lib
../../lib
${module_file_path}/../../../lib )
MARK_AS_ADVANCED(HAPI_LIBRARY)
Expand Down

0 comments on commit 8d6f339

Please sign in to comment.