diff options
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r-- | indra/newview/CMakeLists.txt | 72 |
1 files changed, 60 insertions, 12 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e93d73ad0e..dbd6a60a7c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -4,7 +4,6 @@ project(viewer) include(00-Common) include(Boost) -include(BuildVersion) include(DBusGlib) include(DirectX) include(OpenSSL) @@ -1228,6 +1227,21 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) +set_source_files_properties( + llversioninfo.cpp tests/llversioninfo_test.cpp + PROPERTIES + OBJECT_DEPENDS always_generate_version + COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake + ) + +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt + COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Generating viewer_version.txt + ) +add_custom_target(generate_viewer_version DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt") +add_dependencies(generate_viewer_version "${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt") + if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) @@ -1308,12 +1322,16 @@ if (WINDOWS) string(TOLOWER ${VIEWER_CHANNEL} channel_lower) if(channel_lower MATCHES "^second life release") set(ICON_PATH "release") + set(VIEWER_MACOSX_PHASE "f") elseif(channel_lower MATCHES "^second life beta viewer") set(ICON_PATH "beta") + set(VIEWER_MACOSX_PHASE "b") elseif(channel_lower MATCHES "^second life development") set(ICON_PATH "development") + set(VIEWER_MACOSX_PHASE "d") elseif(channel_lower MATCHES "project") set(ICON_PATH "project") + set(VIEWER_MACOSX_PHASE "a") endif() message("Copying icons for ${ICON_PATH}") execute_process( @@ -1382,8 +1400,11 @@ if (WINDOWS) set_source_files_properties(${viewer_RESOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/res/viewerRes.rc + ${CMAKE_CURRENT_BINARY_DIR}/res/viewerRes.rc + ) set(viewer_RESOURCE_FILES - res/viewerRes.rc + ${CMAKE_CURRENT_BINARY_DIR}/res/viewerRes.rc ${viewer_RESOURCE_FILES} ) @@ -1695,10 +1716,13 @@ if (WINDOWS) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --grid=${GRID} + --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt stage_third_party_libs ${COPY_INPUT_DEPENDENCIES} COMMENT "Performing viewer_manifest copy" @@ -1757,6 +1781,7 @@ if (WINDOWS) --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --grid=${GRID} @@ -1766,12 +1791,14 @@ if (WINDOWS) DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ${COPY_INPUT_DEPENDENCIES} ) add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat windows-setup-build-all + generate_viewer_version ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... @@ -1854,14 +1881,11 @@ else (USE_KDU) ) endif (USE_KDU) -build_version(viewer) - set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") - if (LINUX) - set(product SecondLife-${ARCH}-${viewer_VERSION}) + set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) # These are the generated targets that are copied to package/ set(COPY_INPUT_DEPENDENCIES @@ -1883,6 +1907,7 @@ if (LINUX) --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged --grid=${GRID} @@ -1892,11 +1917,13 @@ if (LINUX) --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ${COPY_INPUT_DEPENDENCIES} ) if (PACKAGE) endif (PACKAGE) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched COMMAND ${PYTHON_EXECUTABLE} @@ -1910,9 +1937,12 @@ if (LINUX) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged --grid=${GRID} + --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ${COPY_INPUT_DEPENDENCIES} COMMENT "Performing viewer_manifest copy" ) @@ -1929,20 +1959,29 @@ endif (LINUX) if (DARWIN) set(product "Second Life") + set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES OUTPUT_NAME "${product}" - MACOSX_BUNDLE_INFO_STRING "info string - localize me" + MACOSX_BUNDLE_INFO_STRING "Second Life Viewer" MACOSX_BUNDLE_ICON_FILE "secondlife.icns" MACOSX_BUNDLE_GUI_IDENTIFIER "Second Life" - MACOSX_BUNDLE_LONG_VERSION_STRING "ververver" + MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" MACOSX_BUNDLE_BUNDLE_NAME "Second Life" - MACOSX_BUNDLE_SHORT_VERSION_STRING "asdf" - MACOSX_BUNDLE_BUNDLE_VERSION "asdf" - MACOSX_BUNDLE_COPYRIGHT "copyright linden lab 2007 - localize me and run me through a legal wringer" + MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}" + MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}" + MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2007" ) + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist" + "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist" + ) + #configure_file( + # "${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/InfoPlist.strings" + # "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Resources/English.lproj/InfoPlist.strings" + # ) add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD COMMAND ${PYTHON_EXECUTABLE} @@ -1955,8 +1994,13 @@ if (DARWIN) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} + --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + DEPENDS + ${VIEWER_BINARY_NAME} + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger) @@ -1969,6 +2013,7 @@ if (DARWIN) if (PACKAGE) add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) + add_dependencies(package generate_viewer_version) add_custom_command( TARGET package POST_BUILD @@ -1982,12 +2027,15 @@ if (DARWIN) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} + --channel=${VIEWER_CHANNEL} + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ) endif (PACKAGE) endif (DARWIN) |