Allow for assembly free[r] tomcrypt builds.

This commit is contained in:
Jason Felds
2015-04-16 18:31:29 -04:00
parent 66f67dcbc2
commit 028229f881
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -16,6 +16,13 @@ option(WITH_JPEG "Build with JPEG Image Support." ON)
# Turn this on to set this to a specific release mode.
option(WITH_FULL_RELEASE "Build as a proper, full release." OFF)
# Turn this on to compile tomcrypt with no assembly data. This is a portable mode.
option(WITH_PORTABLE_TOMCRYPT "Build with assembly/free tomcrypt, making it portable." OFF)
# Turn this on to not use the ROLC assembly featurs of tomcrypt.
# If WITH_PORTABLE_TOMCRYPT is ON, this will automatically have no effect.
option(WITH_NO_ROLC_TOMCRYPT "Build without the ROLC assembly instructions for tomcrypt. (Ignored by Apple builds)" OFF)
# Turn this option off to not use the GPL exclusive components.
option(WITH_GPL_LIBS "Build with GPL libraries." ON)
+6
View File
@@ -269,6 +269,12 @@ add_library("tomcrypt" ${TOMCRYPT_SRC} ${TOMCRYPT_HPP})
set_property(TARGET "tomcrypt" PROPERTY FOLDER "External Libraries")
if (WITH_PORTABLE_TOMCRYPT)
sm_add_compile_definition("tomcrypt" LTC_NO_ASM)
elseif(WITH_NO_ROLC_TOMCRYPT AND NOT APPLE)
sm_add_compile_definition("tomcrypt" LTC_NO_ROLC)
endif()
if (APPLE)
sm_add_compile_definition("tomcrypt" LTC_NO_ROLC)
sm_append_simple_target_property("tomcrypt" XCODE_ATTRIBUTE_GCC_NO_COMMON_BLOCKS "YES")