From 361df3a49636e9034e6657aa3f78016a1a06e64c Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 8 Apr 2015 18:18:06 -0400 Subject: [PATCH 1/5] Provide initial cpack support. Mainly for devs. There are two targets you may not be familiar with, `install` and `package`. * For Linux, `install` now defaults to `/usr/local`, but you can set it back to `/opt` with `cmake -DCMAKE_INSTALL_PREFIX=/opt` if you wish. * For Windows, `install` may not work, but this is not a target you would want usually. * For Linux, `package` has not been tested yet. It will likely create an archive file of what is installed. * For Windows, `package` will create an NSIS package that can be used to install StepMania. One minor change as a result is that the binary and companion dlls will be placed in `bin` instead of `Program` now, but it makes no difference code-wise. Mac OS X users: for now, use the `dmg` target instead. This commit does *not* deprecate the original nsi script yet. The Texture Font Generator program has not been addressed yet. --- Build/INSTALL.md | 19 ++++++++++++- Build/license_install.txt | 8 ++++++ CMake/CPackSetup.cmake | 27 +++++++++++++++++++ CMake/DefineOptions.cmake | 38 ++++++++++++++++++++++++++ CMakeLists.txt | 56 +++++++++------------------------------ src/CMakeLists.txt | 54 ++++++++++++++++++++++++++----------- 6 files changed, 142 insertions(+), 60 deletions(-) create mode 100644 Build/license_install.txt create mode 100644 CMake/CPackSetup.cmake create mode 100644 CMake/DefineOptions.cmake diff --git a/Build/INSTALL.md b/Build/INSTALL.md index 2de35271eb..8ec851a264 100644 --- a/Build/INSTALL.md +++ b/Build/INSTALL.md @@ -2,7 +2,7 @@ Warning == Make sure you read README.md first if you have not. -Installing StepMania +Compiling StepMania == To use StepMania on your computer, it is first assumed that cmake is run (see README.md for more information). Then, follow the guide based on your operating system. @@ -18,3 +18,20 @@ Linux === Using the command line, simply type make and it will place stepmania and GtkModule.so (if requested) in the root StepMania directory. There is no more need to symlink the files. +Installing StepMania +== +Installing in this context refers to placing the folders and generated binary in a standard location based on your operating system. +This guide assumes default install locations. If you want to change the initial location, pass in `-DCMAKE_INSTALL_PREFIX=/new/path/here` when configuring your local setup. + +Windows +=== +The default installation directory is `C:\Program Files (x86)\Stepmania 5`. + +Mac OS X +=== +The `StepMania.app` package can be copied to `/Applications` and it will work as expected. + +Linux +=== +After installing, run `sudo make install`. The files will be placed in the location specified: by default, that is now `/usr/local/stepmania-5.0`. + diff --git a/Build/license_install.txt b/Build/license_install.txt new file mode 100644 index 0000000000..bef2f93ea7 --- /dev/null +++ b/Build/license_install.txt @@ -0,0 +1,8 @@ +LICENSE +======= + +StepMania's source code and resulting binary is licensed under the MIT license. Go to http://opensource.org/licenses/MIT for more information. + +A few sample songs were provided that can be distributed. They are under the CC-NC (Creative Commons Non-Commercial) license. Go to https://creativecommons.org/ for more information. + +The FFMPEG codes (see https://www.ffmpeg.org/ for more) and the MAD library (see http://www.underbit.com/products/mad/ for more) use the GPL license. Go to http://www.gnu.org for more information. diff --git a/CMake/CPackSetup.cmake b/CMake/CPackSetup.cmake new file mode 100644 index 0000000000..aed04999c0 --- /dev/null +++ b/CMake/CPackSetup.cmake @@ -0,0 +1,27 @@ +set(CPACK_PACKAGE_NAME "${SM_EXE_NAME}") +set(CPACK_PACKAGE_VENDOR "StepMania") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Rhythm Game Simulator") +set(CPACK_PACKAGE_VERSION_MAJOR "${SM_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${SM_VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${SM_VERSION_PATCH}") +set(CPACK_PACKAGE_VERSION "${SM_VERSION_TRADITIONAL}") +set(CPACK_NSIS_HELP_LINK "https://github.com/stepmania/stepmania/issues") +set(CPACK_NSIS_URL_INFO_ABOUT "http://www.stepmania.com/") +set(CPACK_RESOURCE_FILE_README "${SM_ROOT_DIR}/README.md") +set(CPACK_RESOURCE_FILE_LICENSE "${SM_BUILD_DIR}/license_install.txt") +set(CPACK_PACKAGE_EXECUTABLES + "${SM_EXE_NAME}" "StepMania ${SM_VERSION_MAJOR}" +) + +if(WIN32) + + # By setting these install keys manually, + # The default directory of "StepMania major.minor.patch" is lost. + # This is currently done to maintain backwards compatibility. + # However, removing these two will allow for multiple versions of StepMania + # to be installed relatively cleanly. + set(CPACK_PACKAGE_INSTALL_DIRECTORY "StepMania ${SM_VERSION_MAJOR}") + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "StepMania ${SM_VERSION_MAJOR}") +endif() + +include(CPack) diff --git a/CMake/DefineOptions.cmake b/CMake/DefineOptions.cmake new file mode 100644 index 0000000000..033965af27 --- /dev/null +++ b/CMake/DefineOptions.cmake @@ -0,0 +1,38 @@ +# Prep options that are needed for each platform. +option(WITH_NETWORKING "Build with networking support." ON) + +# This option quiets warnings that are a part of external projects. +option(WITH_EXTERNAL_WARNINGS "Build with warnings for all components, not just StepMania." OFF) + +# This option is not yet working, but will likely default to ON in the future. +option(WITH_LTO "Build with Link Time Optimization (LTO)/Whole Program Optimization." OFF) + +# This option handles if we use SSE2 processing. +option(WITH_SSE2 "Build with SSE2 Optimizations." ON) + +# This option may go away in the future: if it does, JPEG will always be required. +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 option off to not use the GPL exclusive components. +option(WITH_GPL_LIBS "Build with GPL libraries." ON) + +if(WIN32) + option(WITH_MINIMAID "Build with Mimimaid Lights Support." OFF) +else() + if(LINUX) + option(WITH_FFMPEG "Build with FFMPEG." ON) + # Builder beware: later versions of ffmpeg may break! + option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG." OFF) + option(WITH_TTY "Build with Linux TTY Input Support." OFF) + option(WITH_PROFILING "Build with Profiling Support." OFF) + option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON) + option(WITH_GTK2 "Build with GTK2 Support." ON) + option(WITH_OGG "Build with OGG/Vorbis Support." ON) + option(WITH_MP3 "Build with MP3 Support." ON) + option(WITH_PARALLEL_PORT "Build with Parallel Lights I/O Support." OFF) + option(WITH_CRASH_HANDLER "Build with Crash Handler Support." ON) + endif() +endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 19b97b85fd..9e1ddddcfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,13 @@ set(SM_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Build") set(SM_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") set(SM_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +# TODO: Reconsile the OS dependent naming scheme. +if (WIN32 OR APPLE) + set(SM_EXE_NAME "StepMania") +else() + set(SM_EXE_NAME "stepmania") +endif() + # Some OS specific helpers. if (CMAKE_SYSTEM_NAME MATCHES "Linux") set(LINUX TRUE) @@ -34,48 +41,10 @@ else() set(BSD FALSE) endif() -# Some eventual distribution stuff. -set(CPACK_PACKAGE_NAME "StepMania") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Rhythm Game Simulator") +# Allow for finding our libraries in a standard location. +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/") -# Prep options that are needed for each platform. -option(WITH_NETWORKING "Build with networking support." ON) - -# This option quiets warnings that are a part of external projects. -option(WITH_EXTERNAL_WARNINGS "Build with warnings for all components, not just StepMania." OFF) - -# This option is not yet working, but will likely default to ON in the future. -option(WITH_LTO "Build with Link Time Optimization (LTO)/Whole Program Optimization." OFF) - -# This option handles if we use SSE2 processing. -option(WITH_SSE2 "Build with SSE2 Optimizations." ON) - -# This option may go away in the future: if it does, JPEG will always be required. -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 option off to not use the GPL exclusive components. -option(WITH_GPL_LIBS "Build with GPL libraries." ON) - -if(WIN32) - option(WITH_MINIMAID "Build with Mimimaid Lights Support." OFF) -else() - if(LINUX) - option(WITH_FFMPEG "Build with FFMPEG." ON) - # Builder beware: later versions of ffmpeg may break! - option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG." OFF) - option(WITH_TTY "Build with Linux TTY Input Support." OFF) - option(WITH_PROFILING "Build with Profiling Support." OFF) - option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON) - option(WITH_GTK2 "Build with GTK2 Support." ON) - option(WITH_OGG "Build with OGG/Vorbis Support." ON) - option(WITH_MP3 "Build with MP3 Support." ON) - option(WITH_PARALLEL_PORT "Build with Parallel Lights I/O Support." OFF) - option(WITH_CRASH_HANDLER "Build with Crash Handler Support." ON) - endif() -endif() +include("CMake/DefineOptions.cmake") # Set up version numbers according to the new scheme. set(SM_VERSION_MAJOR 5) @@ -97,9 +66,6 @@ else() set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}") endif() -# Allow for finding our libraries in a standard location. -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/") - # Put the predefined targets in separate groups. set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -377,3 +343,5 @@ add_subdirectory(extern) # The internal libraries and eventual executable to be used. add_subdirectory(src) +# Define installer based items for cpack. +include("CMake/CPackSetup.cmake") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f750b4fbb3..0d5e71368d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -151,13 +151,6 @@ if(NOT APPLE) source_group("" FILES "Main.cpp") endif() -# TODO: Reconsile the OS dependent naming scheme. -if (WIN32 OR APPLE) - set(SM_EXE_NAME "StepMania") -else() - set(SM_EXE_NAME "stepmania") -endif() - # Configure generated files here. configure_file("${SM_XCODE_DIR}/Info.plist.in.xml" "${SM_XCODE_DIR}/Info.StepMania.plist") @@ -215,6 +208,21 @@ set_target_properties("${SM_EXE_NAME}" PROPERTIES OUTPUT_NAME_RELWITHDEBINFO "${SM_RELWITHDEBINFO}" ) +list(APPEND SM_WINDOWS_PROGRAM_DLLS + "${SM_PROGRAM_DIR}/avcodec-53.dll" + "${SM_PROGRAM_DIR}/avformat-53.dll" + "${SM_PROGRAM_DIR}/avutil-51.dll" + "${SM_PROGRAM_DIR}/jpeg.dll" + "${SM_PROGRAM_DIR}/msvcp100.dll" + "${SM_PROGRAM_DIR}/msvcp110.dll" + "${SM_PROGRAM_DIR}/msvcr100.dll" + "${SM_PROGRAM_DIR}/msvcr110.dll" + "${SM_PROGRAM_DIR}/parallel_lights_io.dll" + "${SM_PROGRAM_DIR}/swscale-2.dll" + "${SM_PROGRAM_DIR}/vccorlib110.dll" + "${SM_PROGRAM_DIR}/zlib1.dll" +) + if(WIN32) sm_add_compile_definition("${SM_EXE_NAME}" WINDOWS) sm_add_compile_definition("${SM_EXE_NAME}" _WINDOWS) # TODO: Remove this potential duplicate. @@ -579,18 +587,34 @@ endif() target_include_directories("${SM_EXE_NAME}" PUBLIC ${SM_INCLUDE_DIRS}) if(WIN32) - # TODO: Look forward to 64-bit builds. Also, Find a way to not need to hardcode this. - set(SM_INSTALL_DESTINATION "C:/Program Files (x86)/StepMania 5") -elseif(APPLE) - # TODO: Confirm if anything special is needed. Most Mac apps are just portable .app folders. - set(SM_INSTALL_DESTINATION "") + set(SM_INSTALL_DESTINATION ".") else() - # TODO: Allow for a more flexible system. Good luck convincing old users of that. - set(SM_INSTALL_DESTINATION "/opt/stepmania-5.0") + set(SM_INSTALL_DESTINATION "stepmania-5.0") endif() if(NOT APPLE) - install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_INSTALL_DESTINATION}") + if(WIN32) + # Hardcoding the values for now since the foreach loop is not working as intended. + install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/avcodec-53.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/avformat-53.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/avutil-51.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/jpeg.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/msvcp100.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/msvcp110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/msvcr100.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/msvcr110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/parallel_lights_io.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/swscale-2.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/vccorlib110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + install(FILES "${SM_PROGRAM_DIR}/zlib1.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin") + + # foreach(SM_WINDOW_DLL "${SM_WINDOWS_PROGRAM_DLLS}") + # install(FILES "${SM_WINDOW_DLL}" DESTINATION "${SM_INSTALL_DESTINATION}") + # endforeach() + else() + install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_INSTALL_DESTINATION}") + endif() if (UNIX OR LINUX) install(FILES "${SM_ROOT_DIR}/GtkModule.so" LIBRARY DESTINATION "${SM_INSTALL_DESTINATION}" OPTIONAL) endif() From e4807b9b850a686104af82a63717a97e72d5cc3b Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 15 Apr 2015 18:22:36 -0400 Subject: [PATCH 2/5] Allow for the va library to be used with ffmpeg. This needs verifying. --- CMake/DefineOptions.cmake | 1 + CMake/Modules/FindVa.cmake | 17 +++++++++++++++++ CMakeLists.txt | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 CMake/Modules/FindVa.cmake diff --git a/CMake/DefineOptions.cmake b/CMake/DefineOptions.cmake index 033965af27..c89f387f15 100644 --- a/CMake/DefineOptions.cmake +++ b/CMake/DefineOptions.cmake @@ -26,6 +26,7 @@ else() option(WITH_FFMPEG "Build with FFMPEG." ON) # Builder beware: later versions of ffmpeg may break! option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG." OFF) + option(WITH_LIBVA "Build with libVa support for Video Acceleration." OFF) option(WITH_TTY "Build with Linux TTY Input Support." OFF) option(WITH_PROFILING "Build with Profiling Support." OFF) option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON) diff --git a/CMake/Modules/FindVa.cmake b/CMake/Modules/FindVa.cmake new file mode 100644 index 0000000000..33bfdc5c64 --- /dev/null +++ b/CMake/Modules/FindVa.cmake @@ -0,0 +1,17 @@ +# Find the Video Acceleration library. + +# The following will be set: + +# VA_INCLUDE_DIR +# VA_LIBRARY +# VA_FOUND + +find_path(VA_INCLUDE_DIR NAMES va/va.h) + +set(VA_NAMES "${VA_NAMES}" "va" "libva") +find_library(VA_LIBRARY NAMES ${VA_NAMES}) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(VA DEFAULT_MSG VA_LIBRARY VA_INCLUDE_DIR) + +mark_as_advanced(VA_LIBRARY VA_INCLUDE_DIR) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e1ddddcfc..320092db37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,6 +256,10 @@ elseif(LINUX) endif() if(WITH_FFMPEG) + if(WITH_LIBVA) + find_package(VA) + endif() + if (WITH_SYSTEM_FFMPEG) find_package("FFMPEG") if(NOT FFMPEG_FOUND) @@ -293,6 +297,12 @@ elseif(LINUX) ) endif() + if(WITH_LIBVA AND VA_FOUND) + list(APPEND FFMPEG_CONFIGURE + "--extra-ldflags=-lva" + ) + endif() + if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}") externalproject_add("ffmpeg" SOURCE_DIR "${SM_FFMPEG_SRC_DIR}" From 1bb24245cec08ade876f9177b3a78fa95a20e314 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 15 Apr 2015 19:08:51 -0400 Subject: [PATCH 3/5] Only use -lva for StepMania, not ffmpeg. --- CMakeLists.txt | 6 ------ src/CMakeLists.txt | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 320092db37..23a1107211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,12 +297,6 @@ elseif(LINUX) ) endif() - if(WITH_LIBVA AND VA_FOUND) - list(APPEND FFMPEG_CONFIGURE - "--extra-ldflags=-lva" - ) - endif() - if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}") externalproject_add("ffmpeg" SOURCE_DIR "${SM_FFMPEG_SRC_DIR}" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0d5e71368d..dab40f09c7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -456,6 +456,10 @@ else() # Unix / Linux "${SM_FFMPEG_ROOT}/libavutil/libavutil.a" ) endif() + + if(WITH_LIBVA AND VA_FOUND) + list(APPEND SMDATA_LINK_LIB ${VA_LIBRARY}) + endif() endif() list(APPEND SMDATA_LINK_LIB @@ -525,6 +529,7 @@ else() # Unix / Linux list(APPEND SMDATA_LINK_LIB ${XRANDR_LIBRARIES} ) + list(REMOVE_ITEM SMDATA_LINK_LIB "zlib") endif() From 66f67dcbc2499d23231b7d68867ec4d90b3c1791 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 15 Apr 2015 19:22:39 -0400 Subject: [PATCH 4/5] ...case sensitivity. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23a1107211..04b8c344ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -257,7 +257,7 @@ elseif(LINUX) if(WITH_FFMPEG) if(WITH_LIBVA) - find_package(VA) + find_package("Va") endif() if (WITH_SYSTEM_FFMPEG) From 028229f8816dc0c6e71520608a6bd4212170295a Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 16 Apr 2015 18:31:29 -0400 Subject: [PATCH 5/5] Allow for assembly free[r] tomcrypt builds. --- CMake/DefineOptions.cmake | 7 +++++++ extern/CMakeProject-tomcrypt.cmake | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/CMake/DefineOptions.cmake b/CMake/DefineOptions.cmake index c89f387f15..7f4fcb9b8b 100644 --- a/CMake/DefineOptions.cmake +++ b/CMake/DefineOptions.cmake @@ -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) diff --git a/extern/CMakeProject-tomcrypt.cmake b/extern/CMakeProject-tomcrypt.cmake index 5e6d70b26c..bc86daa1dd 100644 --- a/extern/CMakeProject-tomcrypt.cmake +++ b/extern/CMakeProject-tomcrypt.cmake @@ -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")