Skip to content

Commit 06af84b

Browse files
RafaelPalomarjcfr
andcommitted
ENH: Fix build-tree environment variables in additional settings
Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
1 parent 95d5844 commit 06af84b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CMake/SlicerExtensionGenerateConfig.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file is based on SlicerGenerateSlicerConfig.cmake.
55
#
66
# Example:
7-
#
7+
88
# Add these lines near the end of top-level CMakeLists.txt in Sequences extension
99
# to allow other extensions to use it.
1010
#
@@ -99,7 +99,7 @@ set(EXTENSION_SOURCE_DIR_CONFIG "set(${EXTENSION_NAME}_SOURCE_DIR \"${${EXTENSIO
9999
# Variables that will be used for populating AdditionalLauncherSettings.ini.
100100
set(EXTENSION_ADDITIONAL_LAUNCHER_SETTINGS_FILE_CONTENT_CONFIG "set(${EXTENSION_NAME}_LIBRARY_PATHS_LAUNCHER_BUILD \"${EXTENSION_LIBRARY_PATHS_BUILD}\")
101101
set(${EXTENSION_NAME}_PATHS_LAUNCHER_BUILD \"${EXTENSION_PATHS_BUILD}\")
102-
set(${EXTENSION_NAME}_ENVVARS_LAUNCHER_BUILD \"${EXTENSION_LAUNCHER_SETTINGS_ENVVARS}\")
102+
set(${EXTENSION_NAME}_ENVVARS_LAUNCHER_BUILD \"${EXTENSION_ENVVARS_BUILD}\")
103103
set(${EXTENSION_NAME}_PYTHONPATH_LAUNCHER_BUILD \"${EXTENSION_PYTHONPATH_BUILD}\")")
104104

105105
# Allow extensions to add some custom content.

Extensions/CMake/SlicerBlockAdditionalLauncherSettings.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

33
#
4-
# In case the extension is build using a multi-configuration system, the build
5-
# type will be know at build. For that reason, a script allowing to configure
4+
# In case the extension is built using a multi-configuration system, the build
5+
# type will be known at build. For that reason, a script allowing to configure
66
# the "additional launcher settings" at build time will be generated.
77
#
88

@@ -136,20 +136,20 @@ if(NOT TARGET ConfigureAdditionalLauncherSettings AND _configure_additional_laun
136136
# ENVVARS
137137
#-----------------------------------------------------------------------------
138138

139-
set(EXTENSION_LAUNCHER_SETTINGS_ENVVARS)
139+
set(EXTENSION_ENVVARS_BUILD)
140140

141141
# External projects - environment variables
142142
foreach(varname IN LISTS ${SUPERBUILD_TOPLEVEL_PROJECT}_EP_LABEL_ENVVARS_LAUNCHER_BUILD)
143143
set(value ${${varname}})
144144
list(TRANSFORM value REPLACE "<CMAKE_CFG_INTDIR>" "\${CMAKE_CFG_INTDIR}")
145-
list(APPEND EXTENSION_LAUNCHER_SETTINGS_ENVVARS ${value})
145+
list(APPEND EXTENSION_ENVVARS_BUILD ${value})
146146
endforeach()
147147

148148
# Extension dependencies - environment variables
149149
foreach(dep ${EXTENSION_DEPENDS})
150150
set(paths ${${dep}_ENVVARS_LAUNCHER_BUILD})
151151
list(TRANSFORM paths REPLACE "\\$\\(Configuration\\)" "\${CMAKE_CFG_INTDIR}")
152-
list(APPEND EXTENSION_LAUNCHER_SETTINGS_ENVVARS ${paths})
152+
list(APPEND EXTENSION_ENVVARS_BUILD ${paths})
153153
endforeach()
154154

155155
#-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)