diff --git a/runtime/Cpp/CMakeLists.txt b/runtime/Cpp/CMakeLists.txt index 06ca1a5d0..d54367bba 100644 --- a/runtime/Cpp/CMakeLists.txt +++ b/runtime/Cpp/CMakeLists.txt @@ -107,5 +107,13 @@ if (WITH_DEMO) add_subdirectory(demo) endif(WITH_DEMO) -install(FILES License.txt README.md VERSION +if( EXISTS LICENSE.txt) +install(FILES LICENSE.txt DESTINATION "share/doc/libantlr4") +elseif(EXISTS ../../LICENSE.txt) +install(FILES ../../LICENSE.txt + DESTINATION "share/doc/libantlr4") +endif() + +install(FILES README.md VERSION + DESTINATION "share/doc/libantlr4") diff --git a/runtime/Cpp/deploy-source.sh b/runtime/Cpp/deploy-source.sh index aa1449c18..d079821aa 100755 --- a/runtime/Cpp/deploy-source.sh +++ b/runtime/Cpp/deploy-source.sh @@ -2,8 +2,13 @@ # Zip it rm -f antlr4-cpp-runtime-source.zip -zip -r antlr4-cpp-runtime-source.zip "README.md" "cmake" "demo" "runtime" "CMakeLists.txt" "License.txt" "deploy-macos.sh" "deploy-source.sh" "deploy-windows.cmd" "VERSION" \ +zip -r antlr4-cpp-runtime-source.zip "README.md" "cmake" "demo" "runtime" "CMakeLists.txt" "deploy-macos.sh" "deploy-source.sh" "deploy-windows.cmd" "VERSION" \ -X -x "*.DS_Store*" "antlrcpp.xcodeproj/xcuserdata/*" "*Build*" "*DerivedData*" "*.jar" "demo/generated/*" "*.vscode*" "runtime/build/*" +# Add the license file from the ANTLR root as well. +pushd ../../ +zip runtime/cpp/antlr4-cpp-runtime-source.zip LICENSE.txt +popd + # Deploy #cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download