File tree Expand file tree Collapse file tree 5 files changed +54
-1
lines changed
Expand file tree Collapse file tree 5 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # CMakeLists.txt
3+ # MAF
4+ #
5+ # Created by Daniele Giunchi - Paolo Quadrani on 10/09/10.
6+ # Copyright 2009 B3C. All rights reserved.
7+ #
8+ # See Licence at: http://tiny.cc/QXJ4D
9+ #
10+ #
11+
12+ ###########################################################################
13+ #
14+ # Library: CTK
15+ #
16+ # Copyright (c) Kitware Inc.
17+ #
18+ # Licensed under the Apache License, Version 2.0 (the "License");
19+ # you may not use this file except in compliance with the License.
20+ # You may obtain a copy of the License at
21+ #
22+ # http://www.commontk.org/LICENSE
23+ #
24+ # Unless required by applicable law or agreed to in writing, software
25+ # distributed under the License is distributed on an "AS IS" BASIS,
26+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+ # See the License for the specific language governing permissions and
28+ # limitations under the License.
29+ #
30+ ###########################################################################
31+
32+ #
33+ # Convenient macro allowing to define a "empty" project in case an external one is provided
34+ # using for example <proj>_DIR.
35+ # Doing so allows to keep the external project dependency system happy.
36+ #
37+ macro (mafMacroEmptyExternalProject proj dependencies)
38+
39+ ExternalProject_Add(${proj}
40+ SOURCE_DIR ${CMAKE_BINARY_DIR} /${proj}
41+ BINARY_DIR ${proj} -build
42+ DOWNLOAD_COMMAND ""
43+ CONFIGURE_COMMAND ""
44+ BUILD_COMMAND ""
45+ INSTALL_COMMAND ""
46+ DEPENDS
47+ ${dependencies}
48+ )
49+ endmacro ()
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ SET(QtSOAP_DEPENDS)
3333 # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
3434
3535 ELSE ()
36+ include (CMake/mafMacroEmptyExternalProject.cmake)
3637 mafMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES} " )
3738 ENDIF ()
3839
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if(NOT DEFINED VTK_DIR OR NOT DEFINED VTK_SOURCE_DIR)
4141 #if (MAF_USE_PYTHONQT)
4242 # list(APPEND VTK_QT_ARGS -DVTK_USE_TK:BOOL=OFF)
4343 #endif()
44-
44+
4545 ExternalProject_Add(${proj}
4646 GIT_REPOSITORY "${git_protocol} ://vtk.org/VTK.git"
4747 #GIT_TAG "origin"
@@ -82,6 +82,7 @@ CMAKE_ARGS
8282else ()
8383 # The project is provided using VTK_DIR and VTK_SOURCE_DIR, nevertheless since other
8484 # project may depend on VTK, let's add an 'empty' one
85+ include (CMake/mafMacroEmptyExternalProject.cmake)
8586 mafMacroEmptyExternalProject(${proj} "${VTK_DEPENDENCIES} " )
8687endif ()
8788
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ SET(VXL_DEPENDS)
5454 # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
5555
5656 ELSE ()
57+ include (CMake/mafMacroEmptyExternalProject.cmake)
5758 mafMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES} " )
5859 ENDIF ()
5960
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ SET(qxmlrpc_DEPENDS)
3333 # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
3434
3535 ELSE ()
36+ include (CMake/mafMacroEmptyExternalProject.cmake)
3637 mafMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES} " )
3738 ENDIF ()
3839
You can’t perform that action at this time.
0 commit comments