Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Fixes #4094

Merged
merged 2 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ os_target_config()
global_target_config()
option(BUILD_CV_KINFU_EXAMPLE "Build OpenCV KinectFusion example" OFF)

include(CMake/install_config.cmake)

add_subdirectory(wrappers)

if (BUILD_EXAMPLES AND BUILD_GLSL_EXTENSIONS)
find_package(glfw3 3.3 QUIET)
if(NOT TARGET glfw)
message(STATUS "GLFW 3.3 not found; using internal version")
set(GLFW_INSTALL ON)
set(GLFW_INSTALL ON CACHE BOOL "" FORCE)
add_subdirectory(third-party/glfw)
endif()
#add_subdirectory(src/gl)
add_subdirectory(src/gl)
endif()

if(BUILD_EXAMPLES)
Expand All @@ -73,10 +75,3 @@ endif()
if (BUILD_WITH_TM2)
add_tm2()
endif()

include(CMake/install_config.cmake)

if (BUILD_EXAMPLES AND BUILD_GLSL_EXTENSIONS)
add_subdirectory(src/gl)
endif()

3 changes: 1 addition & 2 deletions third-party/glfw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ endif()
# Install files other than the library
# The library is installed by src/CMakeLists.txt
#--------------------------------------------------------------------
# Enforce GLFW when selecting GLSL
if (GLFW_INSTALL OR BUILD_GLSL_EXTENSIONS)
if (GLFW_INSTALL)
install(DIRECTORY include/GLFW DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)

Expand Down
3 changes: 1 addition & 2 deletions third-party/glfw/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ if (MSVC)
target_compile_definitions(glfw PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

# Enforce GLFW when selecting GLSL
if (GLFW_INSTALL OR BUILD_GLSL_EXTENSIONS)
if (GLFW_INSTALL)
install(TARGETS glfw
EXPORT glfwTargets
RUNTIME DESTINATION "bin"
Expand Down