--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7d736d129..93d7801dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -269,7 +269,9 @@ endif()
+ ################################################################################
+ include_directories(${PROJ_SOURCE_DIR}/src)
+
+-add_subdirectory(data)
++if(BUILD_PROJ_DATABASE)
++ add_subdirectory(data)
++endif()
+ add_subdirectory(include)
+ add_subdirectory(src)
+ add_subdirectory(man)