OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogserver commits / 0ddd24d

Conditionally install the index.html file
0ddd24d3db403d631cb1948ac38478237c1ca55e
by Linas Vepstas <linasvepstas@gmail.com> · 2026-01-17T01:23:43.000Z

Changed files (1) +16 -6

examples/visualizer/CMakeLists.txt +16 -6
……@@ -1,8 +1,18 @@
1
2# Install visualizer files to /usr/local/share/cogserver/visualizer/
3INSTALL(FILES
4 index.html
5 README.md
6 DESTINATION share/cogserver/visualizer
1#
2# Conditionally install index.html to /usr/local/share/cogserver/visualizer/
3# only if the directory does not exist or index.html is not already installed.
4# This allows atomspace-viz to be installed separately and take precedence.
5#
6INSTALL(CODE "
7 set(DEST_DIR \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/share/cogserver/visualizer\")
8 set(DEST_FILE \"\${DEST_DIR}/index.html\")
9 if(NOT EXISTS \"\${DEST_DIR}\" OR NOT EXISTS \"\${DEST_FILE}\")
10 message(STATUS \"Installing: \${DEST_FILE}\")
11 file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/index.html\"
12 DESTINATION \"\${DEST_DIR}\")
13 else()
14 message(STATUS \"Skipping: \${DEST_FILE} (already installed by atomspace-viz)\")
15 endif()
16"
717 COMPONENT visualizer
818)