[f96f56]: src / hugin1 / hugin / CMakeLists.txt Maximize Restore History

Download this file

CMakeLists.txt    152 lines (132 with data), 7.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Application name
IF(APPLE)
set( PROGNAME Hugin )
set( MACOSX_BUNDLE_EXTENSION pto)
set( MACOSX_BUNDLE_ICON_FILE Hugin.icns )
set( MACOSX_BUNDLE_TYPE_ICON_FILE HuginFiles.icns )
set( MACOSX_BUNDLE_MIME_TYPE application/x-ptoptimizer-script )
set( MACOSX_BUNDLE_TYPE_NAME "Hugin Project" )
set( MACOSX_BUNDLE_TYPE_ROLE Editor )
set( MACOSX_BUNDLE_VERSION ${V_MAJOR}.${V_MINOR}.${V_PATCH} )
set( MACOSX_BUNDLE_SHORT_VERSION_STRING ${MACOSX_BUNDLE_VERSION})
set( MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${MACOSX_BUNDLE_VERSION}" )
set( MACOSX_BUNDLE_GUI_IDENTIFIER net.sourceforge.hugin)
set( MACOSX_BUNDLE_INFO_STRING "Hugin ${MACOSX_BUNDLE_VERSION}" )
set( MACOSX_BUNDLE_BUNDLE_NAME "Hugin" )
set( MACOSX_BUNDLE_COPYRIGHT "Copyright 2007 Pablo d'Angelo" )
set( MACOSX_BUNDLE_SIGNATURE "Hgin" )
# set( CMAKE_OSX_ARCHITECTURES ppc;i386 ) #Comment out if not universal binary
ELSE(APPLE)
set( PROGNAME hugin )
ENDIF(APPLE)
# sources
set(hugin_SOURCES
huginApp.cpp ImagesList.cpp MainFrame.cpp CPImageCtrl.cpp CPImagesComboBox.cpp CPEditorPanel.cpp CPDetectorDialog.cpp LensPanel.cpp
ImagesPanel.cpp CommandHistory.cpp PanoPanel.cpp NonaOptionsDialog.cpp HDRMergeOptionDialog.cpp
PreviewFrame.cpp PreviewPanel.cpp GLPreviewFrame.cpp GLViewer.cpp GLRenderer.cpp NumTransDialog.cpp
CropPanel.cpp OptimizePhotometricPanel.cpp OptimizePanel.cpp CPListFrame.cpp
TextKillFocusHandler.cpp PreferencesDialog.cpp ResetDialog.cpp
LocalizedFileTipProvider.cpp wxPanoCommand.cpp AssistantPanel.cpp
HFOVDialog.cpp TextureManager.cpp MeshRemapper.cpp VertexCoordRemapper.cpp
TexCoordRemapper.cpp ChoosyRemapper.cpp MeshManager.cpp ViewState.cpp
OutputProjectionInfo.cpp ToolHelper.cpp Tool.cpp OverviewCameraTool.cpp ProjectionGridTool.cpp OverviewOutlinesTool.cpp
PreviewCropTool.cpp DragTool.cpp PreviewIdentifyTool.cpp PanosphereSphereTool.cpp
PreviewDifferenceTool.cpp PreviewPanoMaskTool.cpp PreviewControlPointTool.cpp
GreatCircles.cpp AboutDialog.cpp LayoutRemapper.cpp PreviewLayoutLinesTool.cpp PreviewColorPickerTool.cpp
MaskEditorPanel.cpp MaskImageCtrl.cpp MaskLoadDialog.cpp HtmlWindow.cpp PanoOperation.cpp PanoOperationTree.cpp)
set(hugin_HEADERS
huginApp.h ImagesList.h MainFrame.h CPImageCtrl.h CPImagesComboBox.h CPEditorPanel.h CPDetectorDialog.h LensPanel.h
ImagesPanel.h CommandHistory.h PanoPanel.h NonaOptionsDialog.h HDRMergeOptionDialog.h
PreviewFrame.h PreviewPanel.h GLPreviewFrame.h GLViewer.h GLRenderer.h NumTransDialog.h
CropPanel.h OptimizePhotometricPanel.h OptimizePanel.h CPListFrame.h
TextKillFocusHandler.h PreferencesDialog.h ResetDialog.h
LocalizedFileTipProvider.h wxPanoCommand.h AssistantPanel.h
HFOVDialog.h TextureManager.h MeshRemapper.h VertexCoordRemapper.h
TexCoordRemapper.h ChoosyRemapper.h MeshManager.h ViewState.h
OutputProjectionInfo.h ToolHelper.h Tool.h OverviewCameraTool.h ProjectionGridTool.h OverviewOutlinesTool.h
PreviewCropTool.h DragTool.h PreviewIdentifyTool.h PanosphereSphereTool.h
PreviewDifferenceTool.h PreviewPanoMaskTool.h PreviewControlPointTool.h
GreatCircles.h AboutDialog.h LayoutRemapper.h PreviewLayoutLinesTool.h PreviewColorPickerTool.h
MaskEditorPanel.h MaskImageCtrl.h MaskLoadDialog.h HtmlWindow.h PanoOperation.h PanoOperationTree.h)
IF(BUILD_HSI)
LIST(APPEND hugin_SOURCES PluginItems.cpp)
LIST(APPEND hugin_HEADERS PluginItems.h)
ENDIF()
IF(APPLE)
if (MAC_SELF_CONTAINED_BUNDLE)
MESSAGE("TODO: MAC_SELF_CONTAINED_BUNDLE currently broken")
FILE(GLOB TRANSLATION_FILES ${CMAKE_CURRENT_BINARY_DIR}/po/*.lproj/locale/hugin.mo)
FILE(GLOB_RECURSE XRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.html
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.htm
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.hhc
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.hhk
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.hhp
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.xrc
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.ico
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.jpg
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.png
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.txt
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.mk
${CMAKE_CURRENT_SOURCE_DIR}/xrc/*.pl)
set( ICON_FILES ${MACOSX_BUNDLE_ICON_FILE} ${MACOSX_BUNDLE_TYPE_ICON_FILE} )
ADD_EXECUTABLE( ${PROGNAME} MACOSX_BUNDLE ${hugin_SOURCES}
${ICON_FILES} ${TRANSLATION_FILES} ${XRC_FILES} )
FOREACH(_file ${TRANSLATION_FILES})
GET_FILENAME_COMPONENT(_file_dir ${_file} PATH)
FILE(RELATIVE_PATH _file_dir ${CMAKE_CURRENT_BINARY_DIR}/po ${_file_dir})
SET_SOURCE_FILES_PROPERTIES( ${_file} PROPERTIES
MACOSX_PACKAGE_LOCATION
"Resources/${_file_dir}" )
ENDFOREACH(_file)
FOREACH(_file ${XRC_FILES})
GET_FILENAME_COMPONENT(_file_dir ${_file} PATH)
FILE(RELATIVE_PATH _file_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_file_dir})
SET_SOURCE_FILES_PROPERTIES( ${_file} PROPERTIES
MACOSX_PACKAGE_LOCATION
"Resources/${_file_dir}")
ENDFOREACH(_file)
#ADD_CUSTOM_COMMAND(
# TARGET ${PROGNAME}
# POST_BUILD
# COMMAND ${CMAKE_COMMAND}
# ARGS -Dfile="${CMAKE_CURRENT_BINARY_DIR}/${PROGNAME}.app/Contents/Resources/xrc/cp_editor_panel.xrc" -P ${CMAKE_SOURCE_DIR}/CMakeModules/fix_osx_xrc.cmake
#)
else (MAC_SELF_CONTAINED_BUNDLE)
# bare bones bundle, with only hugin inside, all other ressources outside.
set( ICON_FILES ${MACOSX_BUNDLE_ICON_FILE} ${MACOSX_BUNDLE_TYPE_ICON_FILE} )
ADD_EXECUTABLE( ${PROGNAME} MACOSX_BUNDLE ${hugin_SOURCES}
${ICON_FILES})
endif (MAC_SELF_CONTAINED_BUNDLE)
SET_SOURCE_FILES_PROPERTIES(
${ICON_FILES}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
ELSEIF ( WIN32 )
ADD_EXECUTABLE( ${PROGNAME} WIN32 ${hugin_SOURCES} ${hugin_HEADERS} hugin_rc.rc )
ELSE (APPLE)
ADD_EXECUTABLE( ${PROGNAME} ${hugin_SOURCES} ${hugin_HEADERS})
ENDIF(APPLE)
target_link_libraries( ${PROGNAME} ${common_libs} ${image_libs} huginbasewx celeste icpfindlib ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES})
IF(BUILD_HSI)
TARGET_LINK_LIBRARIES(${PROGNAME} hugin_python_interface)
ENDIF()
IF (APPLE)
IF (NOT MAC_SELF_CONTAINED_BUNDLE)
install(TARGETS ${PROGNAME}
DESTINATION ${INSTALL_OSX_BUNDLE_DIR})
ELSE (NOT MAC_SELF_CONTAINED_BUNDLE)
# try to build selfcontained bundle
INCLUDE (${CMAKE_SOURCE_DIR}/CMakeModules/AppleRELEASEOptions.cmake)
ENDIF (NOT MAC_SELF_CONTAINED_BUNDLE)
ELSE(APPLE)
install(TARGETS ${PROGNAME}
DESTINATION ${BINDIR})
IF(UNIX)
# install further stuff (icons etc.)
INSTALL(FILES hugin.desktop DESTINATION ${DATADIR}/applications)
INSTALL(FILES gnome-mime-application-x-ptoptimizer-script.png DESTINATION ${DATADIR}/icons/gnome/48x48/mimetypes)
INSTALL(FILES hugin.xml DESTINATION ${DATADIR}/mime/packages)
INSTALL(FILES Makefile.equirect.mk DESTINATION ${HUGINDATADIR})
ENDIF(UNIX)
ENDIF(APPLE)
add_subdirectory(xrc)