Added check to cmake
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 68ffd63..7c88fa2 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -18,6 +18,14 @@
# Boston, MA 02110-1301, USA.
########################################################################
+# Check if there is C++ code at all
+########################################################################
+if(NOT lol_sources)
+ MESSAGE(STATUS "No C++ sources... skipping swig/")
+ return()
+endif(NOT lol_sources)
+
+########################################################################
# Include swig generation macros
########################################################################
find_package(SWIG)