From 3381f72b80b330bdd046341e85f45fec2d35ad36 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 29 Sep 2021 09:19:47 -0400 Subject: [PATCH] correctly handle Tcl stub library if available --- tools/swig/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/swig/CMakeLists.txt b/tools/swig/CMakeLists.txt index b3397c5dc9..966837dc2f 100644 --- a/tools/swig/CMakeLists.txt +++ b/tools/swig/CMakeLists.txt @@ -94,6 +94,11 @@ if(BUILD_SWIG_TCL) if(NOT TCL_FOUND) message(FATAL_ERROR "Tcl development headers and libraries are required") endif() + find_package(TclStub) + if(TCL_STUB_LIBRARY) + target_compile_definitions(tcllammps PRIVATE USE_TCL_STUBS) + target_link_libraries(tcllammps PRIVATE ${TCL_STUB_LIBRARY}) + endif() target_include_directories(tcllammps PRIVATE ${TCL_INCLUDE_PATH}) swig_link_libraries(tcllammps PRIVATE lammps ${TCL_LIBRARY}) # build extended Tcl shell binary