[CMake] Disable tests in external libraries

This commit is contained in:
mocabe 2020-03-20 05:12:25 +09:00
parent fcd272c442
commit 9f5885ea52
3 changed files with 127 additions and 123 deletions

View File

@ -106,15 +106,20 @@ endif()
option (SAMPLES_BUILD "Build samples" OFF)
if (SAMPLES_BUILD)
# external libraries
add_subdirectory(glm)
set(GLFW_BUILD_EXAMPLES OFF)
set(GLFW_BUILD_TESTS OFF)
add_subdirectory(glfw)
add_subdirectory(glslang)
# samples
add_subdirectory(samples)
endif (SAMPLES_BUILD)
endif ()
option (TESTS_BUILD "Build tests" OFF)
if (TESTS_BUILD)
add_subdirectory(tests)
endif (TESTS_BUILD)
endif ()
if (${VULKAN_HPP_INSTALL})
install(FILES ${vulkan_hpp} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vulkan)

View File

@ -40,8 +40,6 @@ else()
include_directories("${Vulkan_INCLUDE_DIRS}")
endif()
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../glm")
FOREACH( linkunit ${linkunits} )
if( IS_DIRECTORY ${linkunit} )
if( EXISTS ${linkunit}/CMakeLists.txt )

View File

@ -36,6 +36,7 @@ add_library(utils
${HEADERS}
)
target_link_libraries(utils PUBLIC glm)
target_link_libraries(utils PUBLIC glfw)
target_link_libraries(utils PUBLIC glslang)
target_link_libraries(utils PUBLIC glslang-default-resource-limits)