diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cf7db93d689e98f5721dd23d957dd591eeadb09..82f41f327558e3b7d0540f4c5be9cc217987db47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1138,4 +1138,6 @@ if(ENABLE_SWIG_EXPERIMENTAL)
   SET_SOURCE_FILES_PROPERTIES(Common/gmshpy.i PROPERTIES CPLUSPLUS ON)
   SWIG_ADD_MODULE(gmshpy python Common/gmshpy.i)
   SWIG_LINK_LIBRARIES(gmshpy ${PYTHON_LIBRARIES} ${EXTERNAL_LIBRARIES} ${LINK_LIBRARIES} shared)
+  add_executable(gmsh_dynamic Fltk/Main.cpp)
+  target_link_libraries(gmsh_dynamic ${LINK_LIBRARIES} shared ${EXTERNAL_LIBRARIES})
 endif(ENABLE_SWIG_EXPERIMENTAL)