--- CMakeLists.txt +++ CMakeLists.txt @@ -112,14 +112,18 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" COMPONENT Development) -include(CTest) -enable_testing() -add_subdirectory(tests) +if(BUILD_TESTING) + include(CTest) + enable_testing() + add_subdirectory(tests) +endif() if(NOT MSVC) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) endif() -add_subdirectory(bin) +if(BUILD_BINARIES) + add_subdirectory(bin) +endif()