Skip to content

Commit

Permalink
fix:skip standard paths for find_package when using Hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
9prady9 committed Mar 17, 2018
1 parent 8371e7b commit 8a3a8fa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,24 @@ if(FG_ENABLE_HUNTER)
hunter_add_package(freetype)
hunter_add_package(Boost)

find_package(freetype CONFIG REQUIRED)
find_package(glbinding REQUIRED NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
find_package(glm REQUIRED NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
find_package(freetype CONFIG REQUIRED NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
find_package(Boost REQUIRED NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
find_package(freetype REQUIRED)
find_package(glbinding REQUIRED)
find_package(glm REQUIRED)
find_package(freetype REQUIRED)
find_package(Boost REQUIRED)
endif()

find_package(Doxygen QUIET)
find_package(glbinding REQUIRED)
find_package(glm REQUIRED)

#packages not available via hunter
find_package(Doxygen QUIET)
find_package(X11 QUIET)
find_package(FreeImage QUIET)
if(UNIX)
find_package(FontConfig REQUIRED)
endif()
find_package(X11 QUIET)
find_package(FreeImage QUIET)
find_package(Boost REQUIRED)

option(FG_BUILD_DOCS
"Build Documentation" ${DOXYGEN_FOUND})
Expand Down
4 changes: 3 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeMod

if(FG_ENABLE_HUNTER)
hunter_add_package(OpenCL)
find_package(OpenCL 1.2 QUIET NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else ()
find_package(OpenCL 1.2 QUIET)
endif()

find_package(OpenGL REQUIRED)
find_package(CUDA QUIET)
find_package(OpenCL 1.2 QUIET)

if(APPLE)
find_package(X11)
Expand Down
5 changes: 3 additions & 2 deletions src/backend/opengl/glfw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
if(FG_ENABLE_HUNTER)
hunter_add_package(glfw)
find_package(glfw3 NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else ()
find_package(glfw3)
endif()

find_package(glfw3)

add_library(wtk_interface INTERFACE)

target_include_directories(wtk_interface
Expand Down
5 changes: 3 additions & 2 deletions src/backend/opengl/sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
if(FG_ENABLE_HUNTER)
hunter_add_package(SDL2)
find_package(SDL2 NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
find_package(SDL2)
endif()

find_package(SDL2)

add_library(wtk_interface INTERFACE)

target_include_directories(wtk_interface
Expand Down

0 comments on commit 8a3a8fa

Please sign in to comment.