Also check if the louloulibs/CMakeLists.txt file is missing

Because apparently when cloning a repository with submodules, git creates
empty sub-directories
This commit is contained in:
Florent Le Coz
2015-02-27 12:46:22 +01:00
parent e6569a1090
commit b3503bf112
+4 -2
View File
@@ -63,8 +63,10 @@ if(RONN_EXECUTABLE)
add_custom_target(doc DEPENDS ${MAN_PAGE})
endif()
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs")
message(FATAL_ERROR "louloulibs/ directory not found. Make sure you fetched the submodules with 'git submodule init && git submodule update'")
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs" OR
NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/loulou/CMakeLists.txt")
message(FATAL_ERROR "louloulibs/ not found or empty. Make sure you fetched
the submodules with 'git submodule init && git submodule update'")
endif()
add_subdirectory("louloulibs")
include_directories("louloulibs")