mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
binpac: Added headers to install target.
Also set some convenience variables that mimic what a FindBinPAC module would set. These could be used by a superproject that wants to decide whether to use an existing BinPAC installation or (re)build from source.
This commit is contained in:
parent
47c64d7fed
commit
92f936fdb8
3 changed files with 40 additions and 4 deletions
|
@ -79,10 +79,16 @@ add_subdirectory(src)
|
||||||
## Build Summary
|
## Build Summary
|
||||||
##
|
##
|
||||||
|
|
||||||
|
if (BinPAC_SKIP_INSTALL)
|
||||||
|
set(binpac_install_summary "Install skipped")
|
||||||
|
else ()
|
||||||
|
set(binpac_install_summary "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
message(
|
message(
|
||||||
"\n==================| BinPAC Build Summary |===================="
|
"\n==================| BinPAC Build Summary |===================="
|
||||||
"\n"
|
"\n"
|
||||||
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
|
"\nInstall prefix: ${binpac_install_summary}"
|
||||||
"\nDebug mode: ${ENABLE_DEBUG}"
|
"\nDebug mode: ${ENABLE_DEBUG}"
|
||||||
"\nRelease mode: ${ENABLE_RELEASE}"
|
"\nRelease mode: ${ENABLE_RELEASE}"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -13,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
set(binpac_lib_SRCS
|
set(binpac_lib_SRCS
|
||||||
binpac_buffer.cc
|
binpac_buffer.cc
|
||||||
binpac_bytestring.cc
|
binpac_bytestring.cc
|
||||||
binpac.h
|
${CMAKE_CURRENT_BINARY_DIR}/binpac.h
|
||||||
binpac_analyzer.h
|
binpac_analyzer.h
|
||||||
binpac_buffer.h
|
binpac_buffer.h
|
||||||
binpac_bytestring.h
|
binpac_bytestring.h
|
||||||
|
@ -25,4 +25,27 @@ add_library(binpac_lib STATIC ${binpac_lib_SRCS})
|
||||||
|
|
||||||
set_target_properties(binpac_lib PROPERTIES OUTPUT_NAME binpac)
|
set_target_properties(binpac_lib PROPERTIES OUTPUT_NAME binpac)
|
||||||
|
|
||||||
install(TARGETS binpac_lib DESTINATION lib)
|
if (NOT BinPAC_SKIP_INSTALL)
|
||||||
|
install(TARGETS binpac_lib DESTINATION lib)
|
||||||
|
install(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/binpac.h
|
||||||
|
binpac_analyzer.h
|
||||||
|
binpac_buffer.h
|
||||||
|
binpac_bytestring.h
|
||||||
|
binpac_exception.h
|
||||||
|
binpac_regex.h
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# This is set to assist superprojects that want to build BinPac
|
||||||
|
# from source and rely on it as a target
|
||||||
|
set(BinPAC_LIBRARY binpac_lib
|
||||||
|
CACHE STRING "BinPAC static library" FORCE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BinPAC_INCLUDE_DIR
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
CACHE STRING "BinPAC header directories" FORCE
|
||||||
|
)
|
||||||
|
|
|
@ -97,4 +97,11 @@ set(binpac_SRCS
|
||||||
|
|
||||||
add_executable(binpac ${binpac_SRCS})
|
add_executable(binpac ${binpac_SRCS})
|
||||||
|
|
||||||
install(TARGETS binpac DESTINATION bin)
|
if (NOT BinPAC_SKIP_INSTALL)
|
||||||
|
install(TARGETS binpac DESTINATION bin)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# This is set to assist superprojects that want to build BinPac
|
||||||
|
# from source and rely on it as a target
|
||||||
|
set(BinPAC_EXE binpac
|
||||||
|
CACHE STRING "BinPAC executable" FORCE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue