--- globjects-1.0.0/CMakeLists.txt.orig	2016-11-24 19:18:49.597354100 +0200
+++ globjects-1.0.0/CMakeLists.txt	2016-11-24 19:18:18.933902100 +0200
@@ -103,9 +103,9 @@
 set(project ${META_PROJECT_NAME})
 
 # Check for system dir install
-set(SYSTEM_DIR_INSTALL FALSE)
+option(SYSTEM_DIR_INSTALL OFF)
 if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-    set(SYSTEM_DIR_INSTALL TRUE)
+    set(SYSTEM_DIR_INSTALL ON CACHE BOOL "Check for system dir install")
 endif()
 
 # Installation paths
@@ -123,6 +123,15 @@
     set(INSTALL_SHORTCUTS "share/applications")     # /usr/[local]/share/applications
     set(INSTALL_ICONS     "share/pixmaps")          # /usr/[local]/share/pixmaps
     set(INSTALL_INIT      "/etc/init")              # /etc/init (upstart init scripts)
+elseif(MINGW AND SYSTEM_DIR_INSTALL)
+    set(INSTALL_ROOT      "lib/cmake")
+    set(INSTALL_CMAKE     "lib/cmake/${project}")
+    set(INSTALL_DATA      "share/${project}")
+    set(INSTALL_BIN       "bin")
+    set(INSTALL_SHARED    "lib")
+    set(INSTALL_LIB       "lib")
+    set(INSTALL_INCLUDE   "include")
+    set(INSTALL_DOC       "share/doc/${project}")
 else()
     # Install into local directory
     set(INSTALL_ROOT      ".")                      # ./
@@ -168,15 +177,17 @@
 # 
 
 # Install version file
-install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_DOC} COMPONENT runtime)
 
 # Install cmake find script for the project
-install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev)
+install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_CMAKE} COMPONENT dev)
 
 # Install the project meta files
-install(FILES AUTHORS   DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
-install(FILES LICENSE   DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
-install(FILES README.md DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+install(FILES AUTHORS   DESTINATION ${INSTALL_DOC} COMPONENT runtime)
+install(FILES LICENSE   DESTINATION ${INSTALL_DOC} COMPONENT runtime)
+install(FILES README.md DESTINATION ${INSTALL_DOC} COMPONENT runtime)
 
 # Install runtime data
-install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${INSTALL_DATA} COMPONENT examples_data)
+if(OPTION_BUILD_EXAMPLES)
+    install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${INSTALL_DATA} COMPONENT examples_data)
+endif()
