Author: Andreas Beckmann <anbe@debian.org>
Description: fix CMake dependencies

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,13 +176,14 @@ IF(ADMIN_ENABLED)
        ENDIF(OPENSSL_FOUND)
 ENDIF(ADMIN_ENABLED)
 
-# Export our internal common library
-ADD_LIBRARY(common STATIC IMPORTED)
-SET_PROPERTY(TARGET common PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/common/libeurephiacommon.a)
-
 # Start the building.  First build the common library, and then the requested eurephia modules
 IF(DATABASE OR PLUGIN OR FIREWALL OR EUREPHIADM)
-        SUBDIRS(common ${subdirs})
+        add_subdirectory(common)
+        SUBDIRS(${subdirs})
+
+# Export our internal common library
+ADD_LIBRARY(common ALIAS eurephiacommon)
+
 ENDIF(DATABASE OR PLUGIN OR FIREWALL OR EUREPHIADM)
 
 # Compile Doxygen docs at the end if requested
