changed: prep package builds
[opensg.git] / CMake / CMakeLists.packaging.win.txt
blob98f21853d19942597f1c484bf36252711a3ca9c9
2 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
4 PROJECT(OpenSGPack)
6 IF("${${PROJECT_NAME}_SOURCE_DIR}"  STREQUAL "${${PROJECT_NAME}_BINARY_DIR}")
7   MESSAGE(FATAL_ERROR "OpenSG requires an out of source Build. \n"
8                       "Please create a separate binary directory and run "
9                       "CMake there.")
10 ENDIF("${${PROJECT_NAME}_SOURCE_DIR}"  STREQUAL "${${PROJECT_NAME}_BINARY_DIR}")
12 IF(CMAKE_INSTALL_PREFIX STREQUAL /usr/local OR WIN32)
13   SET(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/Pack.install 
14                            CACHE PATH "" FORCE)
15 ENDIF()
17 ################
18 # Ref Dir
19 ################
21 STRING(REGEX REPLACE /[^/]*/[^/]*/[^/]*$ "" _BASE_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR})
23 #MESSAGE("BASE DIR : ${_BASE_INSTALL_DIR}")
25 ################
26 # includes 
27 ################
29 FILE(GLOB_RECURSE _${PROJECT_NAME}_INCLUDES 
30                   RELATIVE ${_BASE_INSTALL_DIR}
31                   ${_BASE_INSTALL_DIR}/include/*)
33 FOREACH(_INCLUDE_ELEM ${_${PROJECT_NAME}_INCLUDES})
35   STRING(REGEX REPLACE /[^/]*$ "" _INST_PATH ${_INCLUDE_ELEM})
37 #  MESSAGE("INC : ${_INCLUDE_ELEM} headers")
39   INSTALL(FILES ${_BASE_INSTALL_DIR}/${_INCLUDE_ELEM}
40                 DESTINATION ${_INST_PATH}
41                 PERMISSIONS OWNER_WRITE OWNER_READ
42                             GROUP_READ
43                             WORLD_READ
44                 COMPONENT headers)
46 ENDFOREACH()
48 ################
49 # libs 
50 ################
52 FILE(GLOB_RECURSE _${PROJECT_NAME}_LIBS
53                   RELATIVE ${_BASE_INSTALL_DIR}
54                   ${_BASE_INSTALL_DIR}/lib@OSG_LIBDIR_BASE_SUFFIX@/*)
57 FOREACH(_LIB_ELEM ${_${PROJECT_NAME}_LIBS})
59   STRING(REGEX REPLACE /[^/]*$ "" _INST_PATH ${_LIB_ELEM})
61   SET(_ELEM_COMPONENT libraries_release)
63   IF(${_LIB_ELEM} MATCHES [dD]\\.lib$)
64     SET(_ELEM_COMPONENT libraries_debug)
65   ELSEIF(${_LIB_ELEM} MATCHES [dD][oO]\\.lib$)
66     SET(_ELEM_COMPONENT libraries_debugopt)
67   ELSEIF(${_LIB_ELEM} MATCHES [rR][nN]\\.lib$)
68     SET(_ELEM_COMPONENT libraries_releasenoopt)
69   ELSEIF(${_LIB_ELEM} MATCHES /python/rel/)
70     SET(_ELEM_COMPONENT python_release)
71   ELSEIF(${_LIB_ELEM} MATCHES /python/relnoopt/)
72     SET(_ELEM_COMPONENT python_releasenoopt)
73   ELSEIF(${_LIB_ELEM} MATCHES /python/debugopt/)
74     SET(_ELEM_COMPONENT python_debugopt)
75   ELSEIF(${_LIB_ELEM} MATCHES /python/debug/)
76     SET(_ELEM_COMPONENT python_debug)
77   ENDIF()
79 #  MESSAGE("LIB : ${_LIB_ELEM} ${_ELEM_COMPONENT} ${_INST_PATH}")
81   INSTALL(FILES ${_BASE_INSTALL_DIR}/${_LIB_ELEM}
82                 DESTINATION ${_INST_PATH}
83                 PERMISSIONS OWNER_WRITE OWNER_READ
84                             GROUP_READ
85                             WORLD_READ
86                 COMPONENT ${_ELEM_COMPONENT})
88 ENDFOREACH()
91 ################
92 # bin
93 ################
95 FILE(GLOB_RECURSE _${PROJECT_NAME}_BIN
96                   RELATIVE ${_BASE_INSTALL_DIR}
97                   ${_BASE_INSTALL_DIR}/bin/*)
99 FOREACH(_BIN_ELEM ${_${PROJECT_NAME}_BIN})
101   STRING(REGEX REPLACE /[^/]*$ "" _INST_PATH ${_BIN_ELEM})
103   SET(_ELEM_COMPONENT runtime_release)
105   IF(${_BIN_ELEM} MATCHES bin/debug/.*\\.dll$)
106     SET(_ELEM_COMPONENT runtime_debug)
107   ELSEIF(${_BIN_ELEM} MATCHES bin/debugopt/.*\\.dll$)
108     SET(_ELEM_COMPONENT runtime_debugopt)
109   ELSEIF(${_BIN_ELEM} MATCHES bin/relnoopt/.*\\.dll$)
110     SET(_ELEM_COMPONENT runtime_releasenoopt)
111   ELSEIF(${_BIN_ELEM} MATCHES bin/rel/.*\\.exe$)
112     SET(_ELEM_COMPONENT app_release)
113   ELSEIF(${_BIN_ELEM} MATCHES bin/relnoopt/.*\\.exe$)
114     SET(_ELEM_COMPONENT app_releasenoopt)
115   ELSEIF(${_BIN_ELEM} MATCHES bin/debugopt/.*\\.exe$)
116     SET(_ELEM_COMPONENT app_debugopt)
117   ELSEIF(${_BIN_ELEM} MATCHES bin/debug/.*\\.exe$)
118     SET(_ELEM_COMPONENT app_debug)
119   ELSEIF(${_BIN_ELEM} MATCHES bin/fcd2code/)
120     SET(_ELEM_COMPONENT development_tools)
121   ELSEIF(${_BIN_ELEM} MATCHES bin/[^/]*$)
122     SET(_ELEM_COMPONENT development_tools)
123   ENDIF()
125 #  MESSAGE("BIN : ${_BIN_ELEM} ${_ELEM_COMPONENT} ${_INST_PATH}")
127   INSTALL(FILES ${_BASE_INSTALL_DIR}/${_BIN_ELEM}
128                 DESTINATION ${_INST_PATH}
129                 PERMISSIONS OWNER_WRITE OWNER_READ
130                             GROUP_READ
131                             WORLD_READ
132                 COMPONENT ${_ELEM_COMPONENT})
134 ENDFOREACH()
137 ################
138 # share 
139 ################
141 FILE(GLOB_RECURSE _${PROJECT_NAME}_SHARE
142                   RELATIVE ${_BASE_INSTALL_DIR}
143                   ${_BASE_INSTALL_DIR}/share/*)
145 #MESSAGE("SHARE IN : ${_${PROJECT_NAME}_SHARE}")
147 FOREACH(_SHARE_ELEM ${_${PROJECT_NAME}_SHARE})
149   STRING(REGEX REPLACE /[^/]*$ "" _INST_PATH ${_SHARE_ELEM})
151   SET(_ELEM_COMPONENT Unknown)
153   IF(NOT ${_INST_PATH} MATCHES /Packaging)
155     IF(${_INST_PATH} MATCHES /cmake)
156       SET(_ELEM_COMPONENT development_config)
157     ENDIF()
159     IF(${_INST_PATH} MATCHES /share/doc)
160       SET(_ELEM_COMPONENT runtime_release)
161     ENDIF()
163     IF(${_INST_PATH} MATCHES /Doc)
164       SET(_ELEM_COMPONENT doc)
165     ENDIF()
167     IF(${_INST_PATH} MATCHES /Doc$)
168       SET(BASE_DOC_DIR ${_INST_PATH})
169     ENDIF()
171     IF(${_INST_PATH} MATCHES /Examples/)
172       IF(${_INST_PATH} MATCHES /bin/rel$)
173         SET(_ELEM_COMPONENT examples_release)
174       ELSEIF(${_INST_PATH} MATCHES /bin/relnoopt)
175         SET(_ELEM_COMPONENT examples_releasenoopt)
176       ELSEIF(${_INST_PATH} MATCHES /bin/debugopt$)
177         SET(_ELEM_COMPONENT examples_debugopt)
178       ELSEIF(${_INST_PATH} MATCHES /bin/debug$)
179         SET(_ELEM_COMPONENT examples_debug)
180       ELSEIF(${_INST_PATH} MATCHES /CSM/)
181         SET(_ELEM_COMPONENT app_data)
182       ELSE()
183         SET(_ELEM_COMPONENT example_projects)
184       ENDIF()
185     ENDIF()
187 #    MESSAGE("SHARE : ${_SHARE_ELEM} ${_ELEM_COMPONENT} ${_INST_PATH}")
189     INSTALL(FILES ${_BASE_INSTALL_DIR}/${_SHARE_ELEM}
190                   DESTINATION ${_INST_PATH}
191                   PERMISSIONS OWNER_WRITE OWNER_READ
192                               GROUP_READ
193                               WORLD_READ
194                   COMPONENT ${_ELEM_COMPONENT})
195   ENDIF()
197 ENDFOREACH()
199 STRING(REGEX REPLACE ".*\\.(fc[1-9][0-9])\\..*" "\\1" 
200              _OSG_FC_VERSION ${CMAKE_SYSTEM_VERSION})
202 SET(OSG_HOST_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME})
204 IF(_OSG_FC_VERSION)
205   SET(OSG_HOST_SYSTEM_NAME ${_OSG_FC_VERSION})
206 ENDIF()
208 IF(WIN32)
209   SET(OSG_HOST_SYSTEM_NAME "win")
210 ENDIF()
212 IF(CMAKE_CL_64)
213   SET(OSG_HOST_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}_64)
214 ENDIF()
216 SET(SYSTEM_SPEC ${OSG_HOST_SYSTEM_NAME}.${OSG_HOST_SYSTEM_PROCESSOR})
218 SET(CPACK_PACKAGE_NAME                "OpenSG")
219 SET(CPACK_PACKAGE_VERSION             @OSG_VERSION@)
220 SET(CPACK_PACKAGE_VERSION_MAJOR       @OSG_VERSION_MAJOR@)
221 SET(CPACK_PACKAGE_VERSION_MINOR       @OSG_VERSION_MINOR@)
222 SET(CPACK_PACKAGE_VERSION_PATCH       @OSG_VERSION_PATCH@)
223 SET(CPACK_PACKAGE_VENDOR              "OpenSG")
224 SET(CPACK_PACKAGE_CONTACT             "Dirk Reiners <dirk@www.opensg.org>")
225 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenSG provides the OpenSG scene graph system")
226 SET(CPACK_RESOURCE_FILE_LICENSE       "${_BASE_INSTALL_DIR}/share/doc/OpenSG/COPYING")
228 SET(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
230 IF(NOT OSG_SINGLE_PACKAGE)
231   SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
232   SET(CPACK_RPM_COMPONENT_INSTALL     ON)
233 ENDIF()
235 SET(CPACK_PACKAGE_FILE_NAME           "OpenSG.@OSG_VERSION@.${SYSTEM_SPEC}")
237 MESSAGE("FOOO ${CPACK_PACKAGE_FILE_NAME}")
239 SET(OSGBUILD_PACKAGE_TYPE "ZIP" CACHE STRING "")
241 IF(NOT OSGBUILD_PACKAGE_TYPE OR OSGBUILD_PACKAGE_TYPE STREQUAL "")
242   IF(WIN32)
243     SET(OSGBUILD_PACKAGE_TYPE "ZIP")
244   ELSE(WIN32)
245     SET(OSGBUILD_PACKAGE_TYPE "TBZ2")
246   ENDIF(WIN32)
247 ENDIF()
249 STRING(TOUPPER ${OSGBUILD_PACKAGE_TYPE} CPACK_GENERATOR)
251 SET(CPACK_COMPONENTS_ALL libraries_release
252                          libraries_releasenoopt
253                          libraries_debug
254                          libraries_debugopt
256                          python_release
257                          python_releasenoopt
258                          python_debug
259                          python_debugopt
261                          runtime_release
262                          runtime_releasenoopt
263                          runtime_debug
264                          runtime_debugopt
266                          app_release
267                          app_releasenoopt
268                          app_debugopt
269                          app_debug
271                          headers
272                          development_tools
273                          development_config
275                          examples_release
276                          examples_releasenoopt
277                          examples_debugopt
278                          examples_debug
279                          
280                          app_data
281                          example_projects)
283 SET(CPACK_COMPONENT_GROUP_RUNTIME_DESCRIPTION        "Suport Files needed to execute software with OpenSG.")
284 SET(CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION       "Examples Files needed illustrate software using OpenSG.")
285 SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION          "Development support files needed to develop software with OpenSG.")
287 ###########
288 # Libraries
289 ###########
291 SET(CPACK_COMPONENT_LIBRARIES_RELEASE_DISPLAY_NAME        "Support Release Libraries")
292 SET(CPACK_COMPONENT_LIBRARIES_RELEASE_DESCRIPTION         "Support Release Libraries Description")
293 SET(CPACK_COMPONENT_LIBRARIES_RELEASE_GROUP               "devel")
294 SET(CPACK_COMPONENT_LIBRARIES_RELEASE_INSTALL_TYPES       Full Developer)
296 SET(CPACK_COMPONENT_LIBRARIES_RELEASENOOPT_DISPLAY_NAME   "Support Release No Opt Libraries")
297 SET(CPACK_COMPONENT_LIBRARIES_RELEASENOOPT_DESCRIPTION    "Support Release No Opt Libraries Description")
298 SET(CPACK_COMPONENT_LIBRARIES_RELEASENOOPT_GROUP          "devel")
299 SET(CPACK_COMPONENT_LIBRARIES_RELEASENOOPT_INSTALL_TYPES  Full Developer)
301 SET(CPACK_COMPONENT_LIBRARIES_DEBUG_DISPLAY_NAME          "Support Debug Libraries")
302 SET(CPACK_COMPONENT_LIBRARIES_DEBUG_DESCRIPTION           "Support Debug Libraries Description")
303 SET(CPACK_COMPONENT_LIBRARIES_DEBUG_GROUP                 "devel")
304 SET(CPACK_COMPONENT_LIBRARIES_DEBUG_INSTALL_TYPES         Full Developer)
306 SET(CPACK_COMPONENT_LIBRARIES_DEBUGOPT_DISPLAY_NAME       "Support Debug Opt Libraries")
307 SET(CPACK_COMPONENT_LIBRARIES_DEBUGOPT_DESCRIPTION        "Support Debug Opt Libraries Description")
308 SET(CPACK_COMPONENT_LIBRARIES_DEBUGOPT_GROUP              "devel")
309 SET(CPACK_COMPONENT_LIBRARIES_DEBUGOPT_INSTALL_TYPES      Full Developer)
311 ##################
312 # Libraries python
313 ##################
315 SET(CPACK_COMPONENT_PYTHON_RELEASE_DISPLAY_NAME       "Support Release Runtime")
316 SET(CPACK_COMPONENT_PYTHON_RELEASE_DESCRIPTION        "Support Release Runtime Libraries Description")
317 SET(CPACK_COMPONENT_PYTHON_RELEASE_GROUP              "runtime")
318 SET(CPACK_COMPONENT_PYTHON_RELEASE_INSTALL_TYPES      Full Developer Runtime)
320 SET(CPACK_COMPONENT_PYTHON_RELEASENOOPT_DISPLAY_NAME  "Support Release Runtime")
321 SET(CPACK_COMPONENT_PYTHON_RELEASENOOPT_DESCRIPTION   "Support Release Runtime Libraries Description")
322 SET(CPACK_COMPONENT_PYTHON_RELEASENOOPT_GROUP         "devel")
323 SET(CPACK_COMPONENT_PYTHON_RELEASENOOPT_INSTALL_TYPES Full Developer)
325 SET(CPACK_COMPONENT_PYTHON_DEBUG_DISPLAY_NAME         "Support Debug Runtime")
326 SET(CPACK_COMPONENT_PYTHON_DEBUG_DESCRIPTION          "Support Debug Runtimes Libraries Description")
327 SET(CPACK_COMPONENT_PYTHON_DEBUG_GROUP                "devel")
328 SET(CPACK_COMPONENT_PYTHON_DEBUG_INSTALL_TYPES        Full Developer)
330 SET(CPACK_COMPONENT_PYTHON_DEBUGOPT_DISPLAY_NAME      "Support Debug Runtime")
331 SET(CPACK_COMPONENT_PYTHON_DEBUGOPT_DESCRIPTION       "Support Debug Runtimes Libraries Description")
332 SET(CPACK_COMPONENT_PYTHON_DEBUGOPT_GROUP             "devel")
333 SET(CPACK_COMPONENT_PYTHON_DEBUGOPT_INSTALL_TYPES     Full Developer)
335 ###########
336 # Runtime
337 ###########
339 SET(CPACK_COMPONENT_RUNTIME_RELEASE_DISPLAY_NAME       "Support Release Runtime")
340 SET(CPACK_COMPONENT_RUNTIME_RELEASE_DESCRIPTION        "Support Release Runtime Libraries Description")
341 SET(CPACK_COMPONENT_RUNTIME_RELEASE_GROUP              "runtime")
342 SET(CPACK_COMPONENT_RUNTIME_RELEASE_INSTALL_TYPES      Full Developer Runtime)
344 SET(CPACK_COMPONENT_RUNTIME_RELEASENOOPT_DISPLAY_NAME  "Support Release Runtime")
345 SET(CPACK_COMPONENT_RUNTIME_RELEASENOOPT_DESCRIPTION   "Support Release Runtime Libraries Description")
346 SET(CPACK_COMPONENT_RUNTIME_RELEASENOOPT_GROUP         "devel")
347 SET(CPACK_COMPONENT_RUNTIME_RELEASENOOPT_INSTALL_TYPES Full Developer)
349 SET(CPACK_COMPONENT_RUNTIME_DEBUG_DISPLAY_NAME         "Support Debug Runtime")
350 SET(CPACK_COMPONENT_RUNTIME_DEBUG_DESCRIPTION          "Support Debug Runtimes Libraries Description")
351 SET(CPACK_COMPONENT_RUNTIME_DEBUG_GROUP                "devel")
352 SET(CPACK_COMPONENT_RUNTIME_DEBUG_INSTALL_TYPES        Full Developer)
354 SET(CPACK_COMPONENT_RUNTIME_DEBUGOPT_DISPLAY_NAME      "Support Debug Runtime")
355 SET(CPACK_COMPONENT_RUNTIME_DEBUGOPT_DESCRIPTION       "Support Debug Runtimes Libraries Description")
356 SET(CPACK_COMPONENT_RUNTIME_DEBUGOPT_GROUP             "devel")
357 SET(CPACK_COMPONENT_RUNTIME_DEBUGOPT_INSTALL_TYPES     Full Developer)
359 ###########
360 # App
361 ###########
363 SET(CPACK_COMPONENT_APP_RELEASE_DISPLAY_NAME       "Support Apps Release Runtime")
364 SET(CPACK_COMPONENT_APP_RELEASE_DESCRIPTION        "Support Apps Release Runtime Libraries Description")
365 SET(CPACK_COMPONENT_APP_RELEASE_GROUP              "runtime")
366 SET(CPACK_COMPONENT_APP_RELEASE_INSTALL_TYPES      Full Developer Runtime)
368 SET(CPACK_COMPONENT_APP_DATA_DISPLAY_NAME          "Support Apps Data")
369 SET(CPACK_COMPONENT_APP_DATA_DESCRIPTION           "Support Apps Data Description")
370 SET(CPACK_COMPONENT_APP_DATA_GROUP                  "runtime")
371 SET(CPACK_COMPONENT_APP_DATA_INSTALL_TYPES          Full Developer Runtime)
373 SET(CPACK_COMPONENT_APP_RELEASENOOPT_DISPLAY_NAME  "Support Apps Release Runtime")
374 SET(CPACK_COMPONENT_APP_RELEASENOOPT_DESCRIPTION   "Support Apps Release Runtime Libraries Description")
375 SET(CPACK_COMPONENT_APP_RELEASENOOPT_GROUP         "devel")
376 SET(CPACK_COMPONENT_APP_RELEASENOOPT_INSTALL_TYPES Full Developer)
378 SET(CPACK_COMPONENT_APP_DEBUG_DISPLAY_NAME         "Support Apps Debug Runtime")
379 SET(CPACK_COMPONENT_APP_DEBUG_DESCRIPTION          "Support Apps Debug Runtimes Libraries Description")
380 SET(CPACK_COMPONENT_APP_DEBUG_GROUP                "devel")
381 SET(CPACK_COMPONENT_APP_DEBUG_INSTALL_TYPES        Full Developer)
383 SET(CPACK_COMPONENT_APP_DEBUGOPT_DISPLAY_NAME      "Support Apps Debug Runtime")
384 SET(CPACK_COMPONENT_APP_DEBUGOPT_DESCRIPTION       "Support Apps Debug Runtimes Libraries Description")
385 SET(CPACK_COMPONENT_APP_DEBUGOPT_GROUP             "devel")
386 SET(CPACK_COMPONENT_APP_DEBUGOPT_INSTALL_TYPES     Full Developer)
388 ###########
389 # Dev
390 ###########
392 SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME              "Support Headers")
393 SET(CPACK_COMPONENT_HEADERS_DESCRIPTION               "Support Headers Description")
394 SET(CPACK_COMPONENT_HEADERS_GROUP                     "devel")
395 SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES              Full Developer)
397 SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_DISPLAY_NAME    "Support Dev Tools")
398 SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_DESCRIPTION     "Support Dev Tools Description")
399 SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_GROUP           "devel")
400 SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_INSTALL_TYPES   Full Developer)
402 SET(CPACK_COMPONENT_DEVELOPMENT_CONFIG_DISPLAY_NAME   "Support Dev Config")
403 SET(CPACK_COMPONENT_DEVELOPMENT_CONFIG_DESCRIPTION    "Support Dev Config Description")
404 SET(CPACK_COMPONENT_DEVELOPMENT_CONFIG_GROUP          "devel")
405 SET(CPACK_COMPONENT_DEVELOPMENT_CONFIG_INSTALL_TYPES  Full Developer)
407 SET(CPACK_COMPONENT_EXAMPLE_PROJECTS_DISPLAY_NAME     "Support Dev Config")
408 SET(CPACK_COMPONENT_EXAMPLE_PROJECTS_DESCRIPTION      "Support Dev Config Description")
409 SET(CPACK_COMPONENT_EXAMPLE_PROJECTS_GROUP            "devel")
410 SET(CPACK_COMPONENT_EXAMPLE_PROJECTS_INSTALL_TYPES    Full Developer)
412 ###########
413 # Examples
414 ###########
416 SET(CPACK_COMPONENT_EXAMPLES_RELEASE_DISPLAY_NAME       "Support Examples Release Runtime")
417 SET(CPACK_COMPONENT_EXAMPLES_RELEASE_DESCRIPTION        "Support Examples Release Runtime Libraries Description")
418 SET(CPACK_COMPONENT_EXAMPLES_RELEASE_GROUP              "devel")
419 SET(CPACK_COMPONENT_EXAMPLES_RELEASE_INSTALL_TYPES      Full Developer Runtime)
421 SET(CPACK_COMPONENT_EXAMPLES_RELEASENOOPT_DISPLAY_NAME  "Support Examples Release Runtime")
422 SET(CPACK_COMPONENT_EXAMPLES_RELEASENOOPT_DESCRIPTION   "Support Examples Release Runtime Libraries Description")
423 SET(CPACK_COMPONENT_EXAMPLES_RELEASENOOPT_GROUP         "devel")
424 SET(CPACK_COMPONENT_EXAMPLES_RELEASENOOPT_INSTALL_TYPES Full Developer)
426 SET(CPACK_COMPONENT_EXAMPLES_DEBUG_DISPLAY_NAME         "Support Examples Debug Runtime")
427 SET(CPACK_COMPONENT_EXAMPLES_DEBUG_DESCRIPTION          "Support Examples Debug Runtimes Libraries Description")
428 SET(CPACK_COMPONENT_EXAMPLES_DEBUG_GROUP                "devel")
429 SET(CPACK_COMPONENT_EXAMPLES_DEBUG_INSTALL_TYPES        Full Developer)
431 SET(CPACK_COMPONENT_EXAMPLES_DEBUGOPT_DISPLAY_NAME      "Support Examples Debug Runtime")
432 SET(CPACK_COMPONENT_EXAMPLES_DEBUGOPT_DESCRIPTION       "Support Examples Debug Runtimes Libraries Description")
433 SET(CPACK_COMPONENT_EXAMPLES_DEBUGOPT_GROUP             "devel")
434 SET(CPACK_COMPONENT_EXAMPLES_DEBUGOPT_INSTALL_TYPES     Full Developer)
437 #NSIS specific configuration
438 IF(WIN32)
439   INCLUDE(InstallRequiredSystemLibraries)
440   IF(OSGBUILD_PACKAGE_TYPE STREQUAL "NSIS")
441     IF(MSVC AND (${CMAKE_VERSION} VERSION_GREATER "2.8.0" OR
442                  ${CMAKE_VERSION} VERSION_EQUAL   "2.8.0"   ))
443       INCLUDE(CMakeDetermineVSServicePack)
444       DetermineVSServicePack( my_service_pack )
446       IF(my_service_pack)
447         SET(CPACK_PACKAGE_FILE_NAME       "${PROJECT_NAME}-${OSG_VERSION}-${SYSTEM_SPEC}-${my_service_pack}")
448       ENDIF()
449     ENDIF()
451     #Extra install commands
452     SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "")
453     SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "")
456     SET(CPACK_NSIS_MUI_ICON            "${CMAKE_SOURCE_DIR}/OpenSG2_Icon.ico")
457     SET(CPACK_NSIS_MUI_UNIICON         "${CMAKE_SOURCE_DIR}/OpenSG2_Icon.ico")
458     FILE(TO_NATIVE_PATH                "${CMAKE_SOURCE_DIR}\\InstallerHeader.bmp" WS_CPACK_PACKAGE_ICON)
459     STRING(REPLACE "\\" "\\\\\\\\" CPACK_PACKAGE_ICON ${WS_CPACK_PACKAGE_ICON})
460     SET(CPACK_NSIS_MODIFY_PATH         ON)
461     SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CPACK_PACKAGE_NAME}")
462     SET(CPACK_NSIS_HELP_LINK           "http://www.opensg.org/wiki/Help")
463     SET(CPACK_NSIS_URL_INFO_ABOUT      "http://www.opensg.org")
464     SET(CPACK_NSIS_CONTACT             "${CPACK_PACKAGE_CONTACT}")
465     SET(CPACK_NSIS_CREATE_ICONS_EXTRA  "createShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME} Directory.lnk' '$INSTDIR'")
466     SET(CPACK_NSIS_DELETE_ICONS_EXTRA  "Delete '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME} Directory.lnk'")
467     SET(CPACK_NSIS_MENU_LINKS          "")
469     IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
470       SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
471     ELSE()
472       SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
473     ENDIF()
475   ENDIF()
476 ENDIF()
478 INCLUDE(CPack)