Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/Cpp/runtime/CMakeLists.txt: Install PDB files as well #4478

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions runtime/Cpp/runtime/CMakeLists.txt
Expand Up @@ -168,12 +168,20 @@ if (ANTLR_BUILD_CPP_TESTS)
endif()
endif()

include(GNUInstallDirs)

if (TARGET antlr4_shared)
install(TARGETS antlr4_shared
EXPORT antlr4-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

if(MSVC)
install(FILES $<TARGET_PDB_FILE:antlr4_shared>
DESTINATION ${CMAKE_INSTALL_BINDIR}
OPTIONAL)
endif()
endif()

if (TARGET antlr4_static)
Expand All @@ -182,6 +190,12 @@ if (TARGET antlr4_static)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

if(MSVC)
install(FILES $<TARGET_FILE_DIR:antlr4_static>/$<TARGET_PROPERTY:antlr4_static,COMPILE_PDB_NAME>.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR}
OPTIONAL)
endif()
endif()

install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
Expand Down