Commit bd46e428 authored by Johan Andruejol's avatar Johan Andruejol

Fix iMSTK uses as an external project

Both setupapi and dbghelp are part of visual studio environment and are
not necessary to be explicitly found.
However, this may cause other projects that want to build against iMSTK
to try to find these libraries. Since these packages may not have visual
studio environment setup at configure time, the find_package fails.
It's better instead to rely on them being automatically found during
compilation.
parent f04c7763
......@@ -130,13 +130,7 @@ endif()
#check vrpn/submodules/hidapi.cmake
if(WIN32)
find_library(HIDAPI_LIBRARY
NAMES
setupapi
)
if(NOT HIDAPI_LIBRARY)
message(FATAL_ERROR "hidapi library not found")
endif()
set(HIDAPI_LIBRARY setupapi)
elseif(APPLE)
find_library(MACHID_CoreFoundation_LIBRARY CoreFoundation)
find_library(MACHID_IOKit_LIBRARY IOKit)
......
#-----------------------------------------------------------------------------
# Find dependencies
#-----------------------------------------------------------------------------
set(g3log_PLATFORM_LINK_LIBRARIES)
if(WIN32)
find_library(DbgHelp_LIBRARY NAMES DbgHelp)
if(NOT DbgHelp_LIBRARY)
message(FATAL_ERROR "DbgHelp library not found")
endif()
set(g3log_PLATFORM_LINK_LIBRARIES dbghelp)
endif()
#-----------------------------------------------------------------------------
......@@ -29,7 +26,7 @@ find_library(g3log_LIBRARY
)
mark_as_advanced(g3log_LIBRARY)
set(g3log_LIBRARIES ${g3log_LIBRARY} ${DbgHelp_LIBRARY})
set(g3log_LIBRARIES ${g3log_LIBRARY} ${g3log_PLATFORM_LINK_LIBRARIES})
#-----------------------------------------------------------------------------
# Find package
......
Markdown is supported
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