Skip to content

Commit

Permalink
Merge pull request #111 from jcfr/fix-macos-packaging-of-SPHARM-Shape…
Browse files Browse the repository at this point in the history
…PopulationViewer-ShapeRegressionExtension-shape4D

Fix packaging of: SPHARM-PDM, ShapePopulationViewer, ShapeRegressionExtension and shape4D
  • Loading branch information
jcfr authored Sep 17, 2018
2 parents 814be8a + 94bf790 commit 1d5d760
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(NOT DEFINED slicersources_SOURCE_DIR)
# Download Slicer sources and set variables slicersources_SOURCE_DIR and slicersources_BINARY_DIR
FetchContent_Populate(slicersources
GIT_REPOSITORY https://github.com/jcfr/Slicer
GIT_TAG e08d28f2e8ced063b55c541142be86e10a94f218 # slicersalt-4.9-2018-09-13-8c19c293c
GIT_TAG cd7d51ce9b613bdf966281d9a841017473ec0c07 # slicersalt-4.9-2018-09-13-8c19c293c
GIT_PROGRESS 1
)
else()
Expand Down
5 changes: 3 additions & 2 deletions SuperBuild/External_SPHARM-PDM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build)
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/NIRALUser/SPHARM-PDM.git"
GIT_TAG "ed916619c03b4e14ed7700a5d1b9c084472b2a4b" # 2018-09-14
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/SPHARM-PDM.git"
GIT_TAG "09407a2549d601164b06cd9f41df7b97f37a35e7" # slicersalt-2018-09-14-ed916619c
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${${proj}_DIR}
INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package
Expand All @@ -71,6 +71,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR}
# Options
-D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
DEPENDS
${${proj}_DEPENDENCIES}
)
Expand Down
5 changes: 3 additions & 2 deletions SuperBuild/External_ShapePopulationViewer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
set(${proj}_PACKAGE_DIR ${${proj}_DIR})
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/NIRALUser/ShapePopulationViewer.git"
GIT_TAG "76d356d44f0d0bc9f4901b05452d692d846c2636" # 2018-09-14
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/ShapePopulationViewer.git"
GIT_TAG "3a39e526238f5b5f55928e41369f9a4cb751d145" # slicersalt-2018-09-14-76d356d44
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${${proj}_DIR}
INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package
Expand All @@ -71,6 +71,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR}
# Options
-D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
DEPENDS
${${proj}_DEPENDENCIES}
)
Expand Down
9 changes: 6 additions & 3 deletions SuperBuild/External_ShapeRegressionExtension.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
set(proj ShapeRegressionExtension)

# Set dependency list
set(${proj}_DEPENDENCIES "")
set(${proj}_DEPENDENCIES
shape4D
)

# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj}
Expand Down Expand Up @@ -53,8 +55,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build)
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/KitwareMedical/ShapeRegressionExtension.git"
GIT_TAG "983564f9cdd51cfcb3e35ab26e15d7db314b7d54 " # 2018-09-13 (master)
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/ShapeRegressionExtension.git"
GIT_TAG "35bbc25d185689bdf71798e7a6ff212873dc4969 " # 2018-09-13 (master)
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${${proj}_DIR}
INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package
Expand All @@ -71,6 +73,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR}
# Options
-D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
DEPENDS
${${proj}_DEPENDENCIES}
)
Expand Down
86 changes: 86 additions & 0 deletions SuperBuild/External_shape4D.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#============================================================================
#
# Copyright (c) Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#============================================================================
#
# External project for the project.
#

set(proj shape4D)

# Set dependency list
set(${proj}_DEPENDENCIES
""
)

# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj}
PROJECT_VAR proj
DEPENDS_VAR ${proj}_DEPENDENCIES
SUPERBUILD_VAR Slicer_SUPERBUILD
)

list(APPEND ${proj}_DEPENDENCIES Slicer)

if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !")
endif()

# Sanity checks
if(DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR})
message(FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory")
endif()

if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

set(config ${CMAKE_BUILD_TYPE})
if(DEFINED CMAKE_CONFIGURATION_TYPES)
set(config ${CMAKE_CFG_INTDIR})
endif()

set(${proj}_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build)
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/shape4D.git"
GIT_TAG "3f47cf711a3d21a441c1e46ea992b0f0480b5cf8" # slicersalt-2018-01-22-c74c766a4c
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${${proj}_DIR}
INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package
CMAKE_CACHE_ARGS
# Compiler settings
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
-DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
-DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
-DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS}
# Dependencies
-DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR}
# Options
-D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
DEPENDS
${${proj}_DEPENDENCIES}
)

list(APPEND ${APPLICATION_NAME}_EXTENSION_CPACK_PACKAGE_DIRS
${${proj}_PACKAGE_DIR}/_CPack_Packages
)
else()
ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
endif()
1 change: 1 addition & 0 deletions SuperBuild/SlicerPackageExtensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ set(proj SlicerPackageExtensions)
set(${proj}_EXTENSIONS
SPHARM-PDM
ShapePopulationViewer
shape4D
ShapeRegressionExtension
)

Expand Down

0 comments on commit 1d5d760

Please sign in to comment.