Commit d0636214 authored by Mike Kremer's avatar Mike Kremer
Browse files

Fixed if-branch error

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@195 fdac6126-5c0c-442c-9429-916003d36597
parent 50d85c98
# option to disable inclusion of qmake build system into source package # option to disable inclusion of qmake build system into source package
option ( option (
DISABLE_QMAKE_BUILD DISABLE_QMAKE_BUILD
"Disable inclusion of qmake build system into source package" "Disable inclusion of qmake build system into source package"
OFF OFF
) )
# set name # set name
set (CPACK_PACKAGE_NAME "OpenMesh") set (CPACK_PACKAGE_NAME "OpenMesh")
set (CPACK_PACKAGE_VENDOR "ACG") set (CPACK_PACKAGE_VENDOR "ACG")
# set version # set version
set (CPACK_PACKAGE_VERSION_MAJOR "${OPENMESH_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MAJOR "${OPENMESH_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${OPENMESH_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_MINOR "${OPENMESH_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${OPENMESH_VERSION_PATCH}") set (CPACK_PACKAGE_VERSION_PATCH "${OPENMESH_VERSION_PATCH}")
set (CPACK_PACKAGE_VERSION "${OPENMESH_VERSION}") set (CPACK_PACKAGE_VERSION "${OPENMESH_VERSION}")
# addition package info # addition package info
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenMesh") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenMesh")
set (CPACK_PACKAGE_EXECUTABLES "OpenMesh;") set (CPACK_PACKAGE_EXECUTABLES "OpenMesh;")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}") set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_SOURCE_STRIP_FILES "") set (CPACK_SOURCE_STRIP_FILES "")
# set (CPACK_STRIP_FILES "bin/OpenFlipper") # set (CPACK_STRIP_FILES "bin/OpenFlipper")
# source package generation # source package generation
set (CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP") set (CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
# ignored files in source package # ignored files in source package
set (CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~") set (CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git") list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.svn") list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.svn")
list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}") list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}")
list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile") list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile")
list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile\\\\..*") list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile\\\\..*")
list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.moc\\\\.cpp$") list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.moc\\\\.cpp$")
list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeCache.txt") list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeCache.txt")
list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeFiles") list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeFiles")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Debug/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Debug/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Release/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Release/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/MacOS") list (APPEND CPACK_SOURCE_IGNORE_FILES "/MacOS")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/WIN") list (APPEND CPACK_SOURCE_IGNORE_FILES "/WIN")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/tmp/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/tmp/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevelop") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevelop")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevses") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevses")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/lib/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/lib/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/include/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/include/")
if (DISABLE_QMAKE_BUILD) if (DISABLE_QMAKE_BUILD)
list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.pro") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.pro")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.qmake\\\\.cache") list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.qmake\\\\.cache")
endif () endif ()
# filter out all disabled plugins # filter out all disabled plugins
# file ( # file (
# GLOB _plugins_in # GLOB _plugins_in
# RELATIVE "${CMAKE_SOURCE_DIR}" # RELATIVE "${CMAKE_SOURCE_DIR}"
# "${CMAKE_SOURCE_DIR}/Plugin-*" # "${CMAKE_SOURCE_DIR}/Plugin-*"
# ) # )
#foreach (_plugin ${_plugins_in}) #foreach (_plugin ${_plugins_in})
# string (REPLACE "Plugin-" "" _plugin_name ${_plugin}) # string (REPLACE "Plugin-" "" _plugin_name ${_plugin})
# string (TOUPPER ${_plugin_name} _PLUGIN) # string (TOUPPER ${_plugin_name} _PLUGIN)
# if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${_plugin}/CMakeLists.txt AND DISABLE_QMAKE_BUILD) # if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${_plugin}/CMakeLists.txt AND DISABLE_QMAKE_BUILD)
# list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}") # list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
# elseif (DISABLE_PLUGIN_${_PLUGIN}) # elseif (DISABLE_PLUGIN_${_PLUGIN})
# list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}") # list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
# endif () # endif ()
#endforeach () #endforeach ()
if (WIN32) if (WIN32)
# window NSIS installer # window NSIS installer
set (CPACK_GENERATOR "NSIS") set (CPACK_GENERATOR "NSIS")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set (CPACK_NSIS_DISPLAY_NAME "OpenMesh v${CPACK_PACKAGE_VERSION}") set (CPACK_NSIS_DISPLAY_NAME "OpenMesh v${CPACK_PACKAGE_VERSION}")
# set (CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico") # set (CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
# we need a real uninstaller icon here and we have to define both to make the installer icon work # we need a real uninstaller icon here and we have to define both to make the installer icon work
# set (CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico") # set (CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
# set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\installer.bmp") # set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\installer.bmp")
set (CPACK_NSIS_HELP_LINK "http:\\\\www.openmesh.org") set (CPACK_NSIS_HELP_LINK "http:\\\\www.openmesh.org")
set (CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.openmesh.org") set (CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.openmesh.org")
# TODO: fillme # TODO: fillme
# set (CPACK_NSIS_CONTACT "") # set (CPACK_NSIS_CONTACT "")
#set (CPACK_NSIS_CREATE_ICONS #set (CPACK_NSIS_CREATE_ICONS
# "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\OpenFlipper.lnk\\\" \\\"$INSTDIR\\\\OpenFlipper.exe\\\"" # "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\OpenFlipper.lnk\\\" \\\"$INSTDIR\\\\OpenFlipper.exe\\\""
# ) # )
#set (CPACK_NSIS_DELETE_ICONS #set (CPACK_NSIS_DELETE_ICONS
# "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\OpenFlipper.lnk\\\"" # "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\OpenFlipper.lnk\\\""
# ) # )
# append dll's to installed package # append dll's to installed package
#if (EXISTS ${CMAKE_SOURCE_DIR}/WIN) #if (EXISTS ${CMAKE_SOURCE_DIR}/WIN)
#file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 debug/*.dll") #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 debug/*.dll")
#install(FILES ${_files} #install(FILES ${_files}
#DESTINATION ${ACG_PROJECT_BINDIR} #DESTINATION ${ACG_PROJECT_BINDIR}
#CONFIGURATIONS Debug #CONFIGURATIONS Debug
#) #)
#file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 release/*.dll") #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 release/*.dll")
#install (FILES ${_files} #install (FILES ${_files}
# DESTINATION ${ACG_PROJECT_BINDIR} # DESTINATION ${ACG_PROJECT_BINDIR}
# CONFIGURATIONS Release # CONFIGURATIONS Release
#) #)
#install (FILES "${CMAKE_SOURCE_DIR}/WIN/DLLs/Redistributables/Visual Studio 2008/vcredist_x86.exe" #install (FILES "${CMAKE_SOURCE_DIR}/WIN/DLLs/Redistributables/Visual Studio 2008/vcredist_x86.exe"
# DESTINATION ${ACG_PROJECT_BINDIR} # DESTINATION ${ACG_PROJECT_BINDIR}
#) #)
#set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vcredist_x86.exe\\\" /q:a'") #set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vcredist_x86.exe\\\" /q:a'")
#endif () #endif ()
#elseif (APPLE) #elseif (APPLE)
# apple Drag'n'Drop installer package # apple Drag'n'Drop installer package
#set (CPACK_GENERATOR "DragNDrop;TGZ") #set (CPACK_GENERATOR "DragNDrop;TGZ")
#set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/OpenFlipper/Icons/OpenFlipper_Icon.icns") #set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/OpenFlipper/Icons/OpenFlipper_Icon.icns")
#endif () endif ()
# has to be last # has to be last
if (WIN32) if (WIN32)
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "true") set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "true")
include (InstallRequiredSystemLibraries) include (InstallRequiredSystemLibraries)
install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${ACG_PROJECT_BINDIR}) install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${ACG_PROJECT_BINDIR})
else () else ()
include (InstallRequiredSystemLibraries) include (InstallRequiredSystemLibraries)
endif () endif ()
include (CPack) include (CPack)
if (NOT WIN32 AND NOT APPLE) if (NOT WIN32 AND NOT APPLE)
# no binary target for linux # no binary target for linux
file (REMOVE "${CMAKE_BINARY_DIR}/CPackConfig.cmake") file (REMOVE "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
endif () endif ()
# cmake doesn't create a source package target, so we have to add our own # cmake doesn't create a source package target, so we have to add our own
if (EXISTS "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake") if (EXISTS "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
add_custom_target (PACKAGE_SOURCE add_custom_target (PACKAGE_SOURCE
${CMAKE_CPACK_COMMAND} --config "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake" ${CMAKE_CPACK_COMMAND} --config "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake"
) )
endif () endif ()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment