|
@@ -53,6 +53,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
|
|
|
option(PLUGIN "Enable building of a plugin" OFF)
|
|
|
option(USE_SHLIBDEPS "Enable the use of dpkg-shlibdeps on ubuntu packaging" OFF)
|
|
|
|
|
|
+ option(SIGN_MODULES "Enable signing of ecl standard library modules" OFF)
|
|
|
option(USE_CPPUNIT "Enable unit tests (requires cppunit)" OFF)
|
|
|
option(USE_OPENLDAP "Enable OpenLDAP support (requires OpenLDAP)" ON)
|
|
|
option(USE_ICU "Enable unicode support (requires ICU)" ON)
|
|
@@ -912,4 +913,29 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
|
|
|
message(STATUS "Updated ${cpackvar} to ${${cpackvar}}")
|
|
|
endfunction()
|
|
|
|
|
|
+ MACRO(SIGN_MODULE module)
|
|
|
+ if(SIGN_MODULES)
|
|
|
+ add_custom_command(
|
|
|
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module}
|
|
|
+ COMMAND gpg --output ${CMAKE_CURRENT_BINARY_DIR}/${module} --clearsign ${module}
|
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
+ COMMENT "Adding signed ${module} to project"
|
|
|
+ VERBATIM
|
|
|
+ )
|
|
|
+ else()
|
|
|
+ add_custom_command(
|
|
|
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module}
|
|
|
+ COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/${module} ${CMAKE_CURRENT_BINARY_DIR}/${module}
|
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
+ COMMENT "Adding unsigned ${module} to project"
|
|
|
+ VERBATIM
|
|
|
+ )
|
|
|
+ endif()
|
|
|
+ # Use custom target to cause build to fail if dependency file isn't generated by gpg or cp commands
|
|
|
+ get_filename_component(module_without_extension ${module} NAME_WE)
|
|
|
+ add_custom_target(
|
|
|
+ ${module_without_extension}-ecl ALL
|
|
|
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${module}
|
|
|
+ )
|
|
|
+ ENDMACRO()
|
|
|
endif ("${COMMONSETUP_DONE}" STREQUAL "")
|