@@ -184,21 +184,30 @@ add_library(hpx_interface_wrap_main INTERFACE)
184184target_link_libraries (
185185 hpx_interface_wrap_main INTERFACE $<${_is_executable} :HPXInternal ::hpx_wrap >
186186)
187- add_library (hpx_interface_auto_wrap_main INTERFACE )
188- target_link_libraries (
189- hpx_interface_auto_wrap_main
190- INTERFACE $<${_is_executable} :HPXInternal ::hpx_auto_wrap >
191- )
192187
193188target_link_libraries (wrap_main INTERFACE hpx_interface_wrap_main )
194- target_link_libraries (auto_wrap_main INTERFACE hpx_interface_auto_wrap_main )
195189target_link_libraries (init INTERFACE HPXInternal::hpx_init )
196190target_link_libraries (hpx INTERFACE hpx_interface )
197191
198- # HPX::component is to be linked privately to all HPX components NOTE: The
199- # _is_library guard only prevents simple mistakes of linking HPX::component to
200- # executables. It does not prevent linking it to libraries that are not
201- # components.
192+ set (hpx_targets hpx wrap_main init plugin component)
193+ set (hpx_internal_targets hpx_full hpx_interface hpx_interface_wrap_main)
194+
195+ if (NOT MSVC )
196+ add_library (hpx_interface_auto_wrap_main INTERFACE )
197+ target_link_libraries (
198+ hpx_interface_auto_wrap_main
199+ INTERFACE $<${_is_executable} :HPXInternal ::hpx_auto_wrap >
200+ )
201+ target_link_libraries (auto_wrap_main INTERFACE hpx_interface_auto_wrap_main )
202+ set (hpx_targets ${hpx_targets} auto_wrap_main)
203+ set (hpx_internal_targets ${hpx_internal_targets} hpx_interface_auto_wrap_main)
204+ endif ()
205+
206+ # HPX::component is to be linked privately to all HPX components
207+ #
208+ # NOTE: The _is_library guard only prevents simple mistakes of linking
209+ # HPX::component to executables. It does not prevent linking it to libraries
210+ # that are not components.
202211add_library (component INTERFACE )
203212target_compile_definitions (
204213 component
@@ -219,11 +228,6 @@ target_compile_definitions(
219228 "$<${_is_library} :HPX_PLUGIN_NAME_DEFAULT =hpx_ $<TARGET_PROPERTY :NAME >>"
220229)
221230
222- set (hpx_targets hpx wrap_main auto_wrap_main init plugin component)
223- set (hpx_internal_targets hpx_full hpx_interface hpx_interface_wrap_main
224- hpx_interface_auto_wrap_main
225- )
226-
227231# cmake-format: off
228232install (
229233 TARGETS ${hpx_targets}
0 commit comments