diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c9514fd..978ef35b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,16 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() +# --------------------------------------------------------------------------- +# Check whether all dependencies are present +# --------------------------------------------------------------------------- + +if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/robin_map/include") + message(FATAL_ERROR "The nanobind dependencies are missing! " + "You probably did not clone the project with --recursive. It is possible to recover " + "by invoking\n$ git submodule update --init --recursive") +endif() + # --------------------------------------------------------------------------- # Compile with a few more compiler warnings turned on # --------------------------------------------------------------------------- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c589cf9b..e457aec5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -32,18 +32,5 @@ if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) OR MSVC) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${IN_FILE} ${OUT_DIR}) endforeach() - if (WIN32) - set(OUT_FILE ${OUT_DIR}/nanobind.dll) - elseif(APPLE) - set(OUT_FILE ${OUT_DIR}/libnanobind.dylib) - else() - set(OUT_FILE ${OUT_DIR}/libnanobind.so) - endif() - - add_custom_command( - DEPENDS nanobind TARGET OUTPUT ${OUT_FILE} - COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${OUT_DIR}) - set(TEST_FILES_OUT ${TEST_FILES_OUT} ${OUT_FILE}) - add_custom_target(copy-tests ALL DEPENDS ${TEST_FILES_OUT}) endif()