COMMENT "Create source distribution"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-IF (NOT DEBIAN_BUILD)
- ADD_CUSTOM_TARGET(check DEPENDS rspamd-test-cxx rspamd-test)
- ADD_CUSTOM_TARGET(run-test DEPENDS check
- COMMAND test/rspamd-test-cxx
- COMMAND sh -c 'LUA_PATH="${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
- test/rspamd-test -p /rspamd/lua')
-ENDIF (NOT DEBIAN_BUILD)
+ADD_CUSTOM_TARGET(check DEPENDS rspamd-test-cxx rspamd-test)
+ADD_CUSTOM_TARGET(run-test DEPENDS check
+ COMMAND test/rspamd-test-cxx
+ COMMAND sh -c 'LUA_PATH="${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
+ test/rspamd-test -p /rspamd/lua')
# PVS Studio
-DSYSTEMDDIR=/lib/systemd/system \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
- -DDEBIAN_BUILD=1 \
+ -DNO_TARGET_VERSIONS=1 \
-DENABLE_PCRE2=ON \
-DENABLE_LIBUNWIND=ON \
-DWANT_SYSTEMD_UNITS=ON \
-DSYSTEMDDIR=%{_unitdir} \
-DWANT_SYSTEMD_UNITS=ON \
-DNO_SHARED=ON \
- -DDEBIAN_BUILD=1 \
+ -DNO_TARGET_VERSIONS=1 \
%ifarch x86_64 amd64 arm64 aarch64
-DENABLE_HYPERSCAN=ON \
%endif
ADD_BACKWARD(rspamd)
SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE CXX)
SET_TARGET_PROPERTIES(rspamd-server PROPERTIES LINKER_LANGUAGE CXX)
-IF(NOT DEBIAN_BUILD)
+IF(NOT NO_TARGET_VERSIONS)
SET_TARGET_PROPERTIES(rspamd PROPERTIES VERSION ${RSPAMD_VERSION})
-ENDIF(NOT DEBIAN_BUILD)
+ENDIF()
#TARGET_LINK_LIBRARIES(rspamd ${RSPAMD_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd rspamd-server)
TARGET_LINK_LIBRARIES(rspamc rspamd-server)
SET_TARGET_PROPERTIES(rspamc PROPERTIES LINKER_LANGUAGE CXX)
-IF(NOT DEBIAN_BUILD)
+IF(NOT NO_TARGET_VERSIONS)
SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION})
-ENDIF(NOT DEBIAN_BUILD)
+ENDIF()
INSTALL(TARGETS rspamc RUNTIME DESTINATION bin)
ADD_EXECUTABLE(rspamadm ${RSPAMADMSRC})
TARGET_LINK_LIBRARIES(rspamadm rspamd-server)
-IF (NOT DEBIAN_BUILD)
+IF (NOT NO_TARGET_VERSIONS)
SET_TARGET_PROPERTIES(rspamadm PROPERTIES VERSION ${RSPAMD_VERSION})
-ENDIF (NOT DEBIAN_BUILD)
+ENDIF ()
SET_TARGET_PROPERTIES(rspamadm PROPERTIES LINKER_LANGUAGE CXX)
ADD_BACKWARD(rspamadm)