--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,7 +84,12 @@
 # -------------------------------------------------------
 # User setable options
 # -------------------------------------------------------
-option(CREATE_STATIC_LIB "Make the library static?" on)
+## libraries should be shared by default for Debian
+if(UNIX AND NOT CYGWIN)
+  option(CREATE_STATIC_LIB "Make the library static?" off)
+else(UNIX AND NOT CYGWIN)
+  option(CREATE_STATIC_LIB "Make the library static?" on)
+endif(UNIX AND NOT CYGWIN)
 dependent_option(DISABLE_TTF "Disable TTF Support" off "FREETYPE_FOUND" on)
 if(NOT DISABLE_TTF)
 	set(TTF_OK 1)
@@ -158,6 +163,7 @@
 		add_subdirectory(utils/glyphkeeper)
 		set(GLYPHKEEPER_LIB glyph-agl)
 	endif(NOT ENABLE_INTERNAL_FONT)
+
 endif(UNIX AND NOT CYGWIN)
 
 # -------------------------------------------------------
@@ -299,12 +305,24 @@
 # -------------------------------------------------------
 # Include directory
 # -------------------------------------------------------
+if(UNIX AND NOT CYGWIN)
+  set(FREETYPE_INCLUDE "/usr/include/freetype2")
+endif(UNIX AND NOT CYGWIN)
+
 include_directories(include ${CMAKE_BINARY_DIR}/include include/OpenLayer ${FREETYPE_INCLUDE})
 
 # -------------------------------------------------------
 # OpenLayer Library
 # -------------------------------------------------------
 add_library (openlayer ${CREATE_STATIC_LIB} ${SOURCES})
+if(UNIX AND NOT CYGWIN)
+  SET_TARGET_PROPERTIES(
+    openlayer
+    PROPERTIES
+    SOVERSION 2
+    VERSION 2.1.0
+    )
+endif(UNIX AND NOT CYGWIN)
 
 # -------------------------------------------------------
 # Create the library
