Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 549)
+++ CMakeLists.txt	(revision 552)
@@ -46,68 +46,70 @@
 ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
 
-IF(WIN32)
-  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-  SET(CPACK_PACKAGE_VENDOR "EGRES")
-  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
-    "LEMON - Library of Efficient Models and Optimization in Networks")
-  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
+IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
+  IF(WIN32)
+    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
+    SET(CPACK_PACKAGE_VENDOR "EGRES")
+    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
+      "LEMON - Library of Efficient Models and Optimization in Networks")
+    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
 
-  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
 
-  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
-    "${PROJECT_NAME} ${PROJECT_VERSION}")
-  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
-    "${PROJECT_NAME} ${PROJECT_VERSION}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
+      "${PROJECT_NAME} ${PROJECT_VERSION}")
+    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
+      "${PROJECT_NAME} ${PROJECT_VERSION}")
 
-  SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
+    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
 
-  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
-  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
-  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
+    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
+    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
+    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
+    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
 
-  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
-    "C++ header files")
-  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
-    "DLL and import library")
-  SET(CPACK_COMPONENT_BIN_DESCRIPTION
-    "Command line utilities")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
-    "Doxygen generated documentation")
+    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
+      "C++ header files")
+    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
+      "DLL and import library")
+    SET(CPACK_COMPONENT_BIN_DESCRIPTION
+      "Command line utilities")
+    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
+      "Doxygen generated documentation")
 
-  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
+    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
 
-  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
-  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
+    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
+    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
+    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
 
-  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
-    "Components needed to develop software using LEMON")
-  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
-    "Documentation of LEMON")
+    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
+      "Components needed to develop software using LEMON")
+    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
+      "Documentation of LEMON")
 
-  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
+    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
 
-  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
-  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
+    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
+    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
+    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
 
-  SET(CPACK_GENERATOR "NSIS")
-  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
-  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
-  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
-  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
-  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
-  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
-  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
-  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
-  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
-    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
-    ")
-  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
-    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
-    ")
+    SET(CPACK_GENERATOR "NSIS")
+    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
+    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
+    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
+    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
+    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
+    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
+    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
+    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
+    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
+      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
+      ")
+    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
+      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
+      ")
 
-  INCLUDE(CPack)
-ENDIF(WIN32)
+    INCLUDE(CPack)
+  ENDIF(WIN32)
+ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
