Skip to content

Commit

Permalink
Merge branch 'simo6772/CE-6749-serlio-migration-prep' into devtopia/m…
Browse files Browse the repository at this point in the history
…aster
  • Loading branch information
mistafunk committed Jun 12, 2019
2 parents 44ce250 + e89570b commit 0f573d8
Show file tree
Hide file tree
Showing 7 changed files with 243 additions and 163 deletions.
54 changes: 53 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,62 @@ project(prt4maya CXX)

include(common.cmake)


### version

set(SRL_VERSION_MAJOR 0)
set(SRL_VERSION_MINOR 5)
set(SRL_VERSION_PATCH 0)
if(NOT SRL_VERSION_BUILD)
set(SRL_VERSION_BUILD DEV)
endif()

# we use semver.org, Semantic Versioning 2.0.0
# i.e. <major>.<minor>.<patch>+b<buildnr>.maya<maya major ver>.prt<prt ver>
set(SRL_VERSION_BASE "${SRL_VERSION_MAJOR}.${SRL_VERSION_MINOR}.${SRL_VERSION_PATCH}+b${SRL_VERSION_BUILD}")
set(SRL_VERSION "${SRL_VERSION_BASE}.maya${maya_VERSION_MAJOR}.prt${PRT_VERSION_MAJOR}-${PRT_VERSION_MINOR}-${PRT_VERSION_MICRO}")
message(STATUS "Using SRL_VERSION = ${SRL_VERSION}")


### setup targets

set(CODEC_TARGET prt4maya_codec)
set(PRT4MAYA_TARGET prt4maya)

add_subdirectory(codec)
add_subdirectory(client)

add_dependencies(${PRT4MAYA_TARGET} ${CODEC_TARGET})
add_dependencies(${PRT4MAYA_TARGET} ${CODEC_TARGET})


### setup packaging

if(SRL_WINDOWS)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_ZIP_COMPONENT_INSTALL 1)
set(SRL_PKG_OS "windows")
elseif(SRL_MACOS)
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
set(SRL_PKG_OS "macos")
elseif(SRL_LINUX)
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
set(SRL_PKG_OS "linux")
endif()

set(CPACK_PACKAGE_NAME "serlio")
set(CPACK_PACKAGE_VENDOR "Esri R&D Center Zurich")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Esri CityEngine Plugin for Autodesk Maya")
set(CPACK_PACKAGE_VERSION_MAJOR ${SRL_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${SRL_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${SRL_VERSION_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "serlio-${SRL_VERSION}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${SRL_VERSION}-${SRL_PKG_OS}")

configure_file(deployment.properties.in deployment.properties @ONLY)

include(CPack)
30 changes: 3 additions & 27 deletions src/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ endif()

### setup compiler flags

target_compile_definitions(${PRT4MAYA_TARGET} PRIVATE
-DSRL_VERSION=\"${SRL_VERSION}\") # quoted to use it as string literal

target_include_directories(${PRT4MAYA_TARGET} PRIVATE
${CMAKE_SOURCE_DIR} # for IMayaCallbacks.h
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down Expand Up @@ -86,30 +89,3 @@ else()
install(FILES ${PROJECT_SOURCE_DIR}/../README_linux_osx.md DESTINATION .)
endif()


### package target

set(CPACK_PACKAGE_NAME "esri_prt4maya")
set(CPACK_PACKAGE_VENDOR "Esri R&D Center Zurich")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Maya Plugin Example for CityEngine SDK")
set(CPACK_PACKAGE_VERSION_MAJOR ${PRT4MAYA_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PRT4MAYA_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PRT4MAYA_VERSION_MICRO})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_ZIP_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CPACK_GENERATOR ZIP) # TODO: use tgz
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CPACK_GENERATOR ZIP) # TODO: use tgz
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
endif()

include(CPack)
Loading

0 comments on commit 0f573d8

Please sign in to comment.