diff --git a/build-support/custom-modules/ns3-module-macros.cmake b/build-support/custom-modules/ns3-module-macros.cmake index a09a1a1b8..ec327a8ab 100644 --- a/build-support/custom-modules/ns3-module-macros.cmake +++ b/build-support/custom-modules/ns3-module-macros.cmake @@ -543,7 +543,7 @@ function(build_lib_example) HEADER_FILES ${BLIB_EXAMPLE_HEADER_FILES} LIBRARIES_TO_LINK ${lib${BLIB_LIBNAME}} ${BLIB_EXAMPLE_LIBRARIES_TO_LINK} - ${optional_visualizer_lib} + ${ns3-optional-visualizer-lib} EXECUTABLE_DIRECTORY_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${FOLDER}/ ${IGNORE_PCH} ) diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index edfdf2f4c..b903a333b 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -114,7 +114,7 @@ macro(clear_global_cached_variables) ) set(ns3-libs "" CACHE INTERNAL "list of processed upstream modules") set(ns3-libs-tests "" CACHE INTERNAL "list of test libraries") - set(optional_visualizer_lib "" CACHE INTERNAL "visualizer library name") + set(ns3-optional-visualizer-lib "" CACHE INTERNAL "visualizer library name") mark_as_advanced( build_profile @@ -128,7 +128,7 @@ macro(clear_global_cached_variables) ns3-external-libs ns3-libs ns3-libs-tests - optional_visualizer_lib + ns3-optional-visualizer-lib ) endmacro() @@ -1183,7 +1183,7 @@ macro(process_options) endforeach() if(${ENABLE_VISUALIZER} AND (visualizer IN_LIST libs_to_build)) - set(optional_visualizer_lib "${libvisualizer}" + set(ns3-optional-visualizer-lib "${libvisualizer}" CACHE INTERNAL "visualizer library name" ) endif() @@ -1382,7 +1382,7 @@ macro(build_example) EXECNAME ${EXAMPLE_NAME} SOURCE_FILES ${EXAMPLE_SOURCE_FILES} HEADER_FILES ${EXAMPLE_HEADER_FILES} - LIBRARIES_TO_LINK ${EXAMPLE_LIBRARIES_TO_LINK} ${optional_visualizer_lib} + LIBRARIES_TO_LINK ${EXAMPLE_LIBRARIES_TO_LINK} ${ns3-optional-visualizer-lib} EXECUTABLE_DIRECTORY_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/${examplefolder}/ ${IGNORE_PCH} diff --git a/doc/manual/source/working-with-cmake.rst b/doc/manual/source/working-with-cmake.rst index 41c14e0b7..9ff5d22d6 100644 --- a/doc/manual/source/working-with-cmake.rst +++ b/doc/manual/source/working-with-cmake.rst @@ -2269,7 +2269,7 @@ listed by ``./ns3 show targets`` or your IDE, check if all its dependencies were EXECNAME ${EXAMPLE_NAME} SOURCE_FILES ${EXAMPLE_SOURCE_FILES} HEADER_FILES ${EXAMPLE_HEADER_FILES} - LIBRARIES_TO_LINK ${EXAMPLE_LIBRARIES_TO_LINK} ${optional_visualizer_lib} + LIBRARIES_TO_LINK ${EXAMPLE_LIBRARIES_TO_LINK} ${ns3-optional-visualizer-lib} EXECUTABLE_DIRECTORY_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/${examplefolder}/ ${IGNORE_PCH} @@ -2741,8 +2741,8 @@ Then we check if the |ns3| modules required by the example are enabled to be bui If the list ``missing_dependencies`` is empty, we create the example. Otherwise, we skip it. The example can be linked to the current module (``${lib${BLIB_EXAMPLE_LIBNAME}}``) and other libraries to link (``${BLIB_EXAMPLE_LIBRARIES_TO_LINK}``) and optionally to the visualizer -module (``${optional_visualizer_lib}``). -If the visualizer module is not enabled, ``optional_visualizer_lib`` is empty. +module (``${ns3-optional-visualizer-lib}``). +If the visualizer module is not enabled, ``ns3-optional-visualizer-lib`` is empty. The example can also be linked to a single |ns3| shared library (``lib-ns3-monolib``) or a single |ns3| static library (``lib-ns3-static``), if either ``NS3_MONOLIB=ON`` or ``NS3_STATIC=ON``. @@ -2776,7 +2776,7 @@ Note that both of these options are handled by the ``build_exec`` macro. HEADER_FILES ${BLIB_EXAMPLE_HEADER_FILES} LIBRARIES_TO_LINK ${lib${BLIB_EXAMPLE_LIBNAME}} ${BLIB_EXAMPLE_LIBRARIES_TO_LINK} - ${optional_visualizer_lib} + ${ns3-optional-visualizer-lib} EXECUTABLE_DIRECTORY_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${FOLDER}/ ${IGNORE_PCH} )