Allow linking against system libraries for almost everything (#1790)
This commit is contained in:
@@ -188,3 +188,4 @@ BuildLog.htm
|
||||
*.swp
|
||||
*.pc
|
||||
*.d
|
||||
.vscode/
|
||||
|
||||
+46
-30
@@ -7,18 +7,22 @@ endfunction()
|
||||
|
||||
function(sm_append_simple_target_property target property str)
|
||||
get_target_property(current_property ${target} ${property})
|
||||
if (current_property)
|
||||
if(current_property)
|
||||
list(APPEND current_property ${str})
|
||||
set_target_properties(${target} PROPERTIES ${property} "${current_property}")
|
||||
set_target_properties(${target}
|
||||
PROPERTIES ${property} "${current_property}")
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES ${property} ${str})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Borrowed from http://stackoverflow.com/a/7172941/445373
|
||||
# TODO: Upgrade to cmake 3.x so that this function is not needed.
|
||||
# Borrowed from http://stackoverflow.com/a/7172941/445373 TODO: Upgrade to cmake
|
||||
# 3.x so that this function is not needed.
|
||||
function(sm_join values glue output)
|
||||
string(REPLACE ";" "${glue}" _TMP_STR "${values}")
|
||||
string(REPLACE ";"
|
||||
"${glue}"
|
||||
_TMP_STR
|
||||
"${values}")
|
||||
set(${output} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
@@ -28,20 +32,22 @@ endfunction()
|
||||
|
||||
function(sm_add_compile_flag target flag)
|
||||
get_target_property(current_property ${target} COMPILE_FLAGS)
|
||||
if (current_property)
|
||||
if(current_property)
|
||||
set(current_property "${current_property} ${flag}")
|
||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "${current_property}")
|
||||
set_target_properties(${target}
|
||||
PROPERTIES COMPILE_FLAGS "${current_property}")
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS ${flag})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(sm_add_link_flag target flag)
|
||||
if (MSVC)
|
||||
if(MSVC)
|
||||
# Use a modified form of sm_append_simple_target_property.
|
||||
get_target_property(current_property ${target} LINK_FLAGS)
|
||||
if (current_property)
|
||||
set_target_properties(${target} PROPERTIES LINK_FLAGS "${current_property} ${flag}")
|
||||
if(current_property)
|
||||
set_target_properties(${target}
|
||||
PROPERTIES LINK_FLAGS "${current_property} ${flag}")
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES LINK_FLAGS ${flag})
|
||||
endif()
|
||||
@@ -51,25 +57,32 @@ function(sm_add_link_flag target flag)
|
||||
endfunction()
|
||||
|
||||
function(disable_project_warnings projectName)
|
||||
if (NOT WITH_EXTERNAL_WARNINGS)
|
||||
if (MSVC)
|
||||
if(NOT WITH_EXTERNAL_WARNINGS)
|
||||
if(MSVC)
|
||||
sm_add_compile_flag(${projectName} "/W0")
|
||||
elseif(APPLE)
|
||||
set_target_properties(${projectName} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
|
||||
set_target_properties(
|
||||
${projectName}
|
||||
PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
|
||||
else()
|
||||
set_target_properties(${projectName} PROPERTIES COMPILE_FLAGS "-w")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(check_compile_features BIN_DIR SOURCE_FILE GREETER GREET_SUCCESS GREET_FAILURE TARGET_VAR ON_SUCCESS)
|
||||
macro(check_compile_features
|
||||
BIN_DIR
|
||||
SOURCE_FILE
|
||||
GREETER
|
||||
GREET_SUCCESS
|
||||
GREET_FAILURE
|
||||
TARGET_VAR
|
||||
ON_SUCCESS)
|
||||
if(NOT DEFINED "${TARGET_VAR}")
|
||||
message(STATUS "${GREETER}")
|
||||
try_compile(${TARGET_VAR} "${BIN_DIR}"
|
||||
SOURCES "${SOURCE_FILE}"
|
||||
)
|
||||
try_compile(${TARGET_VAR} "${BIN_DIR}" SOURCES "${SOURCE_FILE}")
|
||||
if(${TARGET_VAR})
|
||||
if (${ON_SUCCESS})
|
||||
if(${ON_SUCCESS})
|
||||
message(STATUS "${GREETER} - ${GREET_SUCCESS}")
|
||||
set(${TARGET_VAR} 1 CACHE INTERNAL "${GREETER}")
|
||||
else()
|
||||
@@ -93,16 +106,15 @@ macro(configure_msvc_runtime)
|
||||
if(MSVC)
|
||||
# Get the compiler options generally used.
|
||||
list(APPEND COMPILER_VARIABLES
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
)
|
||||
if (WITH_STATIC_LINKING)
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
if(WITH_STATIC_LINKING)
|
||||
set(TO_REPLACE "/MD")
|
||||
set(REPLACE_WITH "/MT")
|
||||
else()
|
||||
@@ -110,8 +122,12 @@ macro(configure_msvc_runtime)
|
||||
set(REPLACE_WITH "/MD")
|
||||
endif()
|
||||
foreach(COMPILER_VARIABLE ${COMPILER_VARIABLES})
|
||||
if (${COMPILER_VARIABLE} MATCHES "${TO_REPLACE}")
|
||||
string(REGEX REPLACE "${TO_REPLACE}" "${REPLACE_WITH}" ${COMPILER_VARIABLE} "${${COMPILER_VARIABLE}}")
|
||||
if(${COMPILER_VARIABLE} MATCHES "${TO_REPLACE}")
|
||||
string(REGEX
|
||||
REPLACE "${TO_REPLACE}"
|
||||
"${REPLACE_WITH}"
|
||||
${COMPILER_VARIABLE}
|
||||
"${${COMPILER_VARIABLE}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
+19
-12
@@ -17,9 +17,7 @@ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.stepmania.com/")
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
set(CPACK_RESOURCE_FILE_README "${SM_ROOT_DIR}/README.md")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${SM_CMAKE_DIR}/license_install.txt")
|
||||
set(CPACK_PACKAGE_EXECUTABLES
|
||||
"${SM_EXE_NAME}" "StepMania ${SM_VERSION_MAJOR}"
|
||||
)
|
||||
set(CPACK_PACKAGE_EXECUTABLES "${SM_EXE_NAME}" "StepMania ${SM_VERSION_MAJOR}")
|
||||
set(CPACK_NSIS_MUI_ICON "${SM_INSTALLER_DIR}/install.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${SM_INSTALLER_DIR}/uninstall.ico")
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
@@ -27,7 +25,8 @@ set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
# Custom items for nsis go here.
|
||||
set(CPACK_SM_NSIS_REPOSITORY "https://github.com/stepmania/stepmania")
|
||||
set(CPACK_SM_NSIS_ROOT_DIR "${SM_ROOT_DIR}")
|
||||
set(CPACK_SM_NSIS_PRODUCT_ID "StepMania ${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}")
|
||||
set(CPACK_SM_NSIS_PRODUCT_ID
|
||||
"StepMania ${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}")
|
||||
set(CPACK_SM_NSIS_PRODUCT_VERSION "${SM_VERSION_TRADITIONAL}.0")
|
||||
set(CPACK_SM_NSIS_HEADER_BITMAP "${SM_INSTALLER_DIR}/header-sm5.bmp")
|
||||
set(CPACK_SM_NSIS_WELCOME_BITMAP "${SM_INSTALLER_DIR}/welcome-sm5.bmp")
|
||||
@@ -35,16 +34,24 @@ set(CPACK_SM_NSIS_GIT_VERSION "${SM_VERSION_GIT}")
|
||||
|
||||
if(WIN32)
|
||||
# The header and welcome bitmaps require backslashes.
|
||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_SM_NSIS_HEADER_BITMAP "${CPACK_SM_NSIS_HEADER_BITMAP}")
|
||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_SM_NSIS_WELCOME_BITMAP "${CPACK_SM_NSIS_WELCOME_BITMAP}")
|
||||
string(REGEX
|
||||
REPLACE "/"
|
||||
"\\\\\\\\"
|
||||
CPACK_SM_NSIS_HEADER_BITMAP
|
||||
"${CPACK_SM_NSIS_HEADER_BITMAP}")
|
||||
string(REGEX
|
||||
REPLACE "/"
|
||||
"\\\\\\\\"
|
||||
CPACK_SM_NSIS_WELCOME_BITMAP
|
||||
"${CPACK_SM_NSIS_WELCOME_BITMAP}")
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "${SM_EXE_NAME}-${NSIS_VERSION_FINAL}-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}.${SM_VERSION_MINOR}")
|
||||
# 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}.${SM_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "StepMania ${SM_VERSION_MAJOR}")
|
||||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "Program")
|
||||
set(CPACK_NSIS_INSTALL_ROOT "C:\\\\Games")
|
||||
|
||||
+63
-25
@@ -4,32 +4,41 @@
|
||||
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)
|
||||
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)
|
||||
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.
|
||||
# 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 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." ON)
|
||||
# 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." ON)
|
||||
|
||||
# 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 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."
|
||||
OFF)
|
||||
|
||||
# Turn this option off to not use the GPL exclusive components.
|
||||
option(WITH_GPL_LIBS "Build with GPL libraries." ON)
|
||||
|
||||
# Turn this option off to disable using WAV files with the game.
|
||||
# Note that it is recommended to keep this on.
|
||||
# Turn this option off to disable using WAV files with the game. Note that it is
|
||||
# recommended to keep this on.
|
||||
option(WITH_WAV "Build with WAV Support." ON)
|
||||
|
||||
# Turn this option off to disable using MP3 files with the game.
|
||||
@@ -39,34 +48,63 @@ option(WITH_MP3 "Build with MP3 Support." ON)
|
||||
option(WITH_OGG "Build with OGG/Vorbis Support." ON)
|
||||
|
||||
# Turn this option on to log every segment added or removed.
|
||||
option(WITH_LOGGING_TIMING_DATA "Build with logging all Add and Erase Segment calls." OFF)
|
||||
option(WITH_LOGGING_TIMING_DATA
|
||||
"Build with logging all Add and Erase Segment calls." OFF)
|
||||
|
||||
option(WITH_SYSTEM_PNG "Build with system PNG library (may not work on 1.6+)"
|
||||
OFF)
|
||||
option(WITH_SYSTEM_OGG "Build with system OGG libraries" OFF)
|
||||
option(WITH_SYSTEM_GLEW "Build with system GLEW library" OFF)
|
||||
option(WITH_SYSTEM_TOMMATH "Build with system libtommath" OFF)
|
||||
option(WITH_SYSTEM_TOMCRYPT "Build with system libtomcrypt" OFF)
|
||||
option(WITH_SYSTEM_MAD "Build with system libmad" OFF)
|
||||
option(WITH_SYSTEM_JSONCPP "Build with system jsoncpp" OFF)
|
||||
option(WITH_SYSTEM_JPEG "Build with system jpeglib" OFF)
|
||||
option(WITH_SYSTEM_PCRE "Build with system PCRE" OFF)
|
||||
option(WITH_SYSTEM_ZLIB "Build against system zlib" OFF)
|
||||
|
||||
option(WITH_SDL "Build with SDL" OFF)
|
||||
|
||||
if(NOT MSVC)
|
||||
# Turn this option off to disable using FFMEPG.
|
||||
option(WITH_FFMPEG "Build with FFMPEG." ON)
|
||||
# Change this number to utilize a different number of jobs for building FFMPEG.
|
||||
# Change this number to utilize a different number of jobs for building
|
||||
# FFMPEG.
|
||||
option(WITH_FFMPEG_JOBS "Build FFMPEG with this many jobs." 2)
|
||||
else()
|
||||
# Turn this option on to enable using the Texture Font Generator.
|
||||
option(WITH_TEXTURE_GENERATOR "Build with the Texture Font Generator. Ensure the MFC library is installed." OFF)
|
||||
option(
|
||||
WITH_TEXTURE_GENERATOR
|
||||
"Build with the Texture Font Generator. Ensure the MFC library is installed."
|
||||
OFF)
|
||||
# Turn this option off to use dynamic linking instead of static linking.
|
||||
option(WITH_STATIC_LINKING "Build StepMania with static linking." ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
option(WITH_MINIMAID "Build with Minimaid Lights Support." OFF)
|
||||
# Developer only option: connect to IRC to report the result. Only use with build servers.
|
||||
# Developer only option: connect to IRC to report the result. Only use with
|
||||
# build servers.
|
||||
option(WITH_IRC_POST_HOOK "Report via IRC of the success afterwards." OFF)
|
||||
elseif(LINUX)
|
||||
# Builder beware: later versions of ffmpeg may break!
|
||||
option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG, disabled build with bundled's FFMPEG" OFF)
|
||||
option(WITH_CRYSTALHD_DISABLED "Build FFMPEG without Crystal HD support." OFF)
|
||||
option(WITH_MINIMAID "Build with Minimaid Lights Support." 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_PARALLEL_PORT "Build with Parallel Lights I/O Support." OFF)
|
||||
option(WITH_CRASH_HANDLER "Build with Crash Handler Support." ON)
|
||||
option(WITH_XINERAMA "Build using libXinerama to query for monitor numbers (if available)." ON)
|
||||
# Builder beware: later versions of ffmpeg may break!
|
||||
option(WITH_SYSTEM_FFMPEG
|
||||
"Build with the system's FFMPEG, disabled build with bundled's FFMPEG"
|
||||
OFF)
|
||||
option(WITH_CRYSTALHD_DISABLED "Build FFMPEG without Crystal HD support." OFF)
|
||||
option(WITH_MINIMAID "Build with Minimaid Lights Support." 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_PARALLEL_PORT "Build with Parallel Lights I/O Support." OFF)
|
||||
option(WITH_CRASH_HANDLER "Build with Crash Handler Support." ON)
|
||||
option(WITH_XINERAMA
|
||||
"Build using libXinerama to query for monitor numbers (if available)."
|
||||
ON)
|
||||
option(WITH_ALSA "Build with ALSA support" ON)
|
||||
option(WITH_PULSEAUDIO "Build with PulseAudio support" OFF)
|
||||
option(WITH_JACK "Build with JACK support" OFF)
|
||||
option(WITH_XRANDR "Build with Xrandr support" ON)
|
||||
option(WITH_X11 "Build with X11 support" ON)
|
||||
endif()
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# From the CMake wiki, get the DirectX version needed.
|
||||
# This assumes default directories.
|
||||
# From the CMake wiki, get the DirectX version needed. This assumes default
|
||||
# directories.
|
||||
|
||||
# Once loaded, the following are defined:
|
||||
# DIRECTX_FOUND
|
||||
# DIRECTX_INCLUDE_DIR
|
||||
# DIRECTX_LIBRARIES
|
||||
# Once loaded, the following are defined: DIRECTX_FOUND DIRECTX_INCLUDE_DIR
|
||||
# DIRECTX_LIBRARIES
|
||||
|
||||
if(NOT WIN32)
|
||||
return()
|
||||
@@ -15,29 +13,28 @@ if(NOT EXISTS "$ENV{DXSDK_DIR}")
|
||||
endif()
|
||||
|
||||
set(DIRECTX_INCLUDE_SEARCH_PATHS
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"$ENV{DXSDK_DIR}/Include"
|
||||
)
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"$ENV{DXSDK_DIR}/Include")
|
||||
|
||||
set(DIRECTX_LIBRARY_SEARCH_PATHS
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||
)
|
||||
# TODO: Do not be limited to x86 in the future.
|
||||
"$ENV{DXSDK_DIR}/Lib/x86")
|
||||
|
||||
find_path(DIRECTX_INCLUDE_DIR
|
||||
NAMES "DxErr.h"
|
||||
PATHS ${DIRECTX_INCLUDE_SEARCH_PATHS}
|
||||
DOC "Where can DxErr.h be found?"
|
||||
)
|
||||
NAMES "DxErr.h"
|
||||
PATHS ${DIRECTX_INCLUDE_SEARCH_PATHS}
|
||||
DOC "Where can DxErr.h be found?")
|
||||
|
||||
find_library(DIRECTX_LIBRARIES
|
||||
NAMES "DxErr.lib" "d3dx9.lib"
|
||||
PATHS ${DIRECTX_LIBRARY_SEARCH_PATHS}
|
||||
DOC "Where can the DX libraries be found?"
|
||||
)
|
||||
NAMES "DxErr.lib" "d3dx9.lib"
|
||||
PATHS ${DIRECTX_LIBRARY_SEARCH_PATHS}
|
||||
DOC "Where can the DX libraries be found?")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DIRECTX DEFAULT_MSG DIRECTX_INCLUDE_DIR DIRECTX_LIBRARIES)
|
||||
find_package_handle_standard_args(DIRECTX
|
||||
DEFAULT_MSG
|
||||
DIRECTX_INCLUDE_DIR
|
||||
DIRECTX_LIBRARIES)
|
||||
|
||||
if(DIRECTX_FOUND)
|
||||
mark_as_advanced(DIRECTX_INCLUDE_DIR DIRECTX_LIBRARIES)
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
# Stick to traditional approaches here. The following are defined.
|
||||
|
||||
# DL_FOUND - The system has the dl library.
|
||||
# DL_INCLUDE_DIR - The dl include directory.
|
||||
# DL_LIBRARIES - The library file to link to.
|
||||
# DL_FOUND - The system has the dl library. DL_INCLUDE_DIR - The dl include
|
||||
# directory. DL_LIBRARIES - The library file to link to.
|
||||
|
||||
if (DL_INCLUDE_DIR AND DL_LIBRARIES)
|
||||
if(DL_INCLUDE_DIR AND DL_LIBRARIES)
|
||||
# Already in cache, so don't repeat the finding procedures.
|
||||
set(DL_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(DL_INCLUDE_DIR dlfcn.h
|
||||
PATHS /usr/local/include /usr/include
|
||||
)
|
||||
find_path(DL_INCLUDE_DIR dlfcn.h PATHS /usr/local/include /usr/include)
|
||||
|
||||
find_library(DL_LIBRARIES dl
|
||||
PATHS /usr/local/lib /usr/lib /lib
|
||||
)
|
||||
find_library(DL_LIBRARIES dl PATHS /usr/local/lib /usr/lib /lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DL DEFAULT_MSG DL_LIBRARIES DL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(DL_INCLUDE_DIR DL_LIBRARIES)
|
||||
|
||||
|
||||
@@ -1,148 +1,141 @@
|
||||
# This was copied from the robotology/ycm project.
|
||||
|
||||
#.rst:
|
||||
# FindFFMPEG
|
||||
# .rst: FindFFMPEG
|
||||
# ----------
|
||||
#
|
||||
# Find the native FFMPEG includes and library
|
||||
#
|
||||
# This module defines::
|
||||
#
|
||||
# FFMPEG_INCLUDE_DIR, where to find avcodec.h, avformat.h ...
|
||||
# FFMPEG_LIBRARIES, the libraries to link against to use FFMPEG.
|
||||
# FFMPEG_FOUND, If false, do not try to use FFMPEG.
|
||||
# FFMPEG_INCLUDE_DIR, where to find avcodec.h, avformat.h ... FFMPEG_LIBRARIES,
|
||||
# the libraries to link against to use FFMPEG. FFMPEG_FOUND, If false, do not
|
||||
# try to use FFMPEG.
|
||||
#
|
||||
# also defined, but not for general use are::
|
||||
#
|
||||
# FFMPEG_avformat_LIBRARY, where to find the FFMPEG avformat library.
|
||||
# FFMPEG_avcodec_LIBRARY, where to find the FFMPEG avcodec library.
|
||||
# FFMPEG_avformat_LIBRARY, where to find the FFMPEG avformat library.
|
||||
# FFMPEG_avcodec_LIBRARY, where to find the FFMPEG avcodec library.
|
||||
#
|
||||
# This is useful to do it this way so that we can always add more libraries
|
||||
# if needed to ``FFMPEG_LIBRARIES`` if ffmpeg ever changes...
|
||||
# This is useful to do it this way so that we can always add more libraries if
|
||||
# needed to ``FFMPEG_LIBRARIES`` if ffmpeg ever changes...
|
||||
|
||||
#=============================================================================
|
||||
# =============================================================================
|
||||
# Copyright: 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
# Distributed under the OSI-approved BSD License (the "License"); see
|
||||
# accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of YCM, substitute the full
|
||||
# License text for the above reference.)
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# License for more information.
|
||||
# =============================================================================
|
||||
# (To distribute this file outside of YCM, substitute the full License text for
|
||||
# the above reference.)
|
||||
|
||||
# Originally from VTK project
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
libavformat/avformat.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/
|
||||
/usr/local/include/)
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR libavformat/avformat.h
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/ffmpeg
|
||||
$ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/
|
||||
/usr/local/include/
|
||||
)
|
||||
find_library(FFMPEG_avformat_LIBRARY
|
||||
avformat
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavformat
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
|
||||
find_library(FFMPEG_avformat_LIBRARY avformat
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavformat
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
find_library(FFMPEG_avcodec_LIBRARY
|
||||
avcodec
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavcodec
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
|
||||
find_library(FFMPEG_avcodec_LIBRARY avcodec
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavcodec
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
find_library(FFMPEG_avutil_LIBRARY avutil
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavutil
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
find_library(FFMPEG_avutil_LIBRARY
|
||||
avutil
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavutil
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
|
||||
if(NOT DISABLE_SWSCALE)
|
||||
find_library(FFMPEG_swscale_LIBRARY swscale
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libswscale
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
find_library(FFMPEG_swscale_LIBRARY
|
||||
swscale
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libswscale
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
endif(NOT DISABLE_SWSCALE)
|
||||
|
||||
find_library(FFMPEG_avdevice_LIBRARY avdevice
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavdevice
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
find_library(_FFMPEG_z_LIBRARY_ z
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
find_library(FFMPEG_avdevice_LIBRARY
|
||||
avdevice
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
$ENV{FFMPEG_DIR}/libavdevice
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
|
||||
find_library(_FFMPEG_z_LIBRARY_
|
||||
z
|
||||
$ENV{FFMPEG_DIR}
|
||||
$ENV{FFMPEG_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib)
|
||||
|
||||
if(FFMPEG_INCLUDE_DIR)
|
||||
if(FFMPEG_avformat_LIBRARY)
|
||||
if(FFMPEG_avcodec_LIBRARY)
|
||||
if(FFMPEG_avutil_LIBRARY)
|
||||
set(FFMPEG_FOUND "YES")
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY}
|
||||
${FFMPEG_avcodec_LIBRARY}
|
||||
${FFMPEG_avutil_LIBRARY}
|
||||
)
|
||||
set(FFMPEG_LIBRARIES
|
||||
${FFMPEG_avformat_LIBRARY}
|
||||
${FFMPEG_avcodec_LIBRARY}
|
||||
${FFMPEG_avutil_LIBRARY})
|
||||
if(FFMPEG_swscale_LIBRARY)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES}
|
||||
${FFMPEG_swscale_LIBRARY}
|
||||
)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_swscale_LIBRARY})
|
||||
endif()
|
||||
if(FFMPEG_avdevice_LIBRARY)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES}
|
||||
${FFMPEG_avdevice_LIBRARY}
|
||||
)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_avdevice_LIBRARY})
|
||||
endif()
|
||||
if(_FFMPEG_z_LIBRARY_)
|
||||
set( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES}
|
||||
${_FFMPEG_z_LIBRARY_}
|
||||
)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${_FFMPEG_z_LIBRARY_})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
FFMPEG_INCLUDE_DIR
|
||||
FFMPEG_INCLUDE_DIR1
|
||||
FFMPEG_INCLUDE_DIR2
|
||||
FFMPEG_INCLUDE_DIR3
|
||||
FFMPEG_INCLUDE_DIR4
|
||||
FFMPEG_INCLUDE_DIR5
|
||||
FFMPEG_avformat_LIBRARY
|
||||
FFMPEG_avcodec_LIBRARY
|
||||
FFMPEG_avutil_LIBRARY
|
||||
FFMPEG_swscale_LIBRARY
|
||||
FFMPEG_avdevice_LIBRARY
|
||||
_FFMPEG_z_LIBRARY_
|
||||
)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR
|
||||
FFMPEG_INCLUDE_DIR1
|
||||
FFMPEG_INCLUDE_DIR2
|
||||
FFMPEG_INCLUDE_DIR3
|
||||
FFMPEG_INCLUDE_DIR4
|
||||
FFMPEG_INCLUDE_DIR5
|
||||
FFMPEG_avformat_LIBRARY
|
||||
FFMPEG_avcodec_LIBRARY
|
||||
FFMPEG_avutil_LIBRARY
|
||||
FFMPEG_swscale_LIBRARY
|
||||
FFMPEG_avdevice_LIBRARY
|
||||
_FFMPEG_z_LIBRARY_)
|
||||
|
||||
# Set package properties if FeatureSummary was included
|
||||
if(COMMAND set_package_properties)
|
||||
set_package_properties(FFMPEG PROPERTIES DESCRIPTION "A complete, cross-platform solution to record, convert and stream audio and video")
|
||||
set_package_properties(
|
||||
FFMPEG
|
||||
PROPERTIES
|
||||
DESCRIPTION
|
||||
"A complete, cross-platform solution to record, convert and stream audio and video"
|
||||
)
|
||||
set_package_properties(FFMPEG PROPERTIES URL "http://ffmpeg.org/")
|
||||
endif()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Borrowed from https://github.com/onyx-intl/cmake_modules/blob/master/FindIconv.cmake
|
||||
# Borrowed from https://github.com/onyx-
|
||||
# intl/cmake_modules/blob/master/FindIconv.cmake
|
||||
|
||||
# Find Iconv on the system. When this is done, the following are defined:
|
||||
|
||||
# ICONV_FOUND - The system has Iconv.
|
||||
# ICONV_INCLUDE_DIR - The Iconv include directory.
|
||||
# ICONV_LIBRARIES - The library file to link to.
|
||||
# ICONV_FOUND - The system has Iconv. ICONV_INCLUDE_DIR - The Iconv include
|
||||
# directory. ICONV_LIBRARIES - The library file to link to.
|
||||
|
||||
if (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
if(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
# Already in cache, so don't repeat the finding procedures.
|
||||
set(ICONV_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
@@ -16,7 +16,9 @@ set(ICONV_NAMES ${ICONV_NAMES} iconv libiconv libiconv-2 c)
|
||||
find_library(ICONV_LIBRARIES NAMES ${ICONV_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ICONV DEFAULT_MSG ICONV_LIBRARIES ICONV_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(ICONV
|
||||
DEFAULT_MSG
|
||||
ICONV_LIBRARIES
|
||||
ICONV_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARIES)
|
||||
|
||||
|
||||
@@ -1,75 +1,64 @@
|
||||
# This was borrowed from the gnuradio repository.
|
||||
|
||||
# - Try to find jack-2.6
|
||||
# Once done this will define
|
||||
# * Try to find jack-2.6 Once done this will define
|
||||
#
|
||||
# JACK_FOUND - system has jack
|
||||
# JACK_INCLUDE_DIRS - the jack include directory
|
||||
# JACK_LIBRARIES - Link these to use jack
|
||||
# JACK_DEFINITIONS - Compiler switches required for using jack
|
||||
# JACK_FOUND - system has jack JACK_INCLUDE_DIRS - the jack include directory
|
||||
# JACK_LIBRARIES - Link these to use jack JACK_DEFINITIONS - Compiler switches
|
||||
# required for using jack
|
||||
#
|
||||
# Copyright (c) 2008 Andreas Schneider <[email protected]>
|
||||
# Modified for other libraries by Lasse Kärkkäinen <tronic>
|
||||
# Copyright (c) 2008 Andreas Schneider <[email protected]> Modified for other
|
||||
# libraries by Lasse Kärkkäinen <tronic>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
# Redistribution and use is allowed according to the terms of the New BSD
|
||||
# license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
if(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(JACK_FOUND TRUE)
|
||||
else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
else(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
# use pkg-config to get the directories and then use these values in the
|
||||
# FIND_PATH() and FIND_LIBRARY() calls
|
||||
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
include(UsePkgConfig)
|
||||
pkgconfig(jack _JACK_INCLUDEDIR _JACK_LIBDIR _JACK_LDFLAGS _JACK_CFLAGS)
|
||||
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
else(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_JACK jack)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_path(JACK_INCLUDE_DIR
|
||||
NAMES
|
||||
jack/jack.h
|
||||
PATHS
|
||||
${_JACK_INCLUDEDIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
)
|
||||
NAMES jack/jack.h
|
||||
PATHS ${_JACK_INCLUDEDIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include)
|
||||
|
||||
find_library(JACK_LIBRARY
|
||||
NAMES
|
||||
jack
|
||||
PATHS
|
||||
${_JACK_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
NAMES jack
|
||||
PATHS ${_JACK_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib)
|
||||
|
||||
if (JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||
if(JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||
set(JACK_FOUND TRUE)
|
||||
|
||||
set(JACK_INCLUDE_DIRS
|
||||
${JACK_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(JACK_LIBRARIES
|
||||
${JACK_LIBRARIES}
|
||||
${JACK_LIBRARY}
|
||||
)
|
||||
|
||||
endif (JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||
|
||||
set(JACK_LIBRARIES ${JACK_LIBRARIES} ${JACK_LIBRARY})
|
||||
|
||||
endif(JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(JACK DEFAULT_MSG
|
||||
JACK_INCLUDE_DIRS JACK_LIBRARIES)
|
||||
find_package_handle_standard_args(JACK
|
||||
DEFAULT_MSG
|
||||
JACK_INCLUDE_DIRS
|
||||
JACK_LIBRARIES)
|
||||
|
||||
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
|
||||
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced
|
||||
# view
|
||||
mark_as_advanced(JACK_INCLUDE_DIRS JACK_LIBRARIES)
|
||||
endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
endif(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
|
||||
@@ -3,7 +3,9 @@ find_path(LIBMAD_INCLUDE_DIR mad.h)
|
||||
find_library(LIBMAD_LIBRARY mad)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBMAD DEFAULT_MSG LIBMAD_LIBRARY LIBMAD_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(LIBMAD
|
||||
DEFAULT_MSG
|
||||
LIBMAD_LIBRARY
|
||||
LIBMAD_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBMAD_LIBRARY LIBMAD_INCLUDE_DIR)
|
||||
|
||||
|
||||
+13
-18
@@ -1,24 +1,19 @@
|
||||
# Copied from marsyas, which is also copied from fqterm.
|
||||
# Further modifications are done.
|
||||
# Copied from marsyas, which is also copied from fqterm. Further modifications
|
||||
# are done.
|
||||
|
||||
IF(UNIX)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(OSS_HDR_NAME "linux/soundcard.h")
|
||||
ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
SET(OSS_HDR_NAME "sys/soundcard.h")
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
ENDIF(UNIX)
|
||||
if(UNIX)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(OSS_HDR_NAME "linux/soundcard.h")
|
||||
else(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(OSS_HDR_NAME "sys/soundcard.h")
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
endif(UNIX)
|
||||
|
||||
FIND_PATH(OSS_INCLUDE_DIR "${OSS_HDR_NAME}"
|
||||
"/usr/include" "/usr/local/include"
|
||||
)
|
||||
find_path(OSS_INCLUDE_DIR "${OSS_HDR_NAME}" "/usr/include" "/usr/local/include")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OSS DEFAULT_MSG OSS_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED (
|
||||
OSS_FOUND
|
||||
OSS_INCLUDE_DIR
|
||||
)
|
||||
mark_as_advanced(OSS_FOUND OSS_INCLUDE_DIR)
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
# Borrowed from code.openhub.net
|
||||
|
||||
# Base Io build system
|
||||
# Written by Jeremy Tregunna <[email protected]>
|
||||
# Base Io build system Written by Jeremy Tregunna <[email protected]>
|
||||
#
|
||||
# Find libogg.
|
||||
|
||||
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
|
||||
SET(OGG_NAMES ${OGG_NAMES} ogg libogg)
|
||||
FIND_LIBRARY(OGG_LIBRARY NAMES ${OGG_NAMES} PATH)
|
||||
set(OGG_NAMES ${OGG_NAMES} ogg libogg)
|
||||
find_library(OGG_LIBRARY NAMES ${OGG_NAMES} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
# The following will be set:
|
||||
|
||||
# PCRE_INCLUDE_DIR
|
||||
# PCRE_LIBRARY
|
||||
# PCRE_FOUND
|
||||
# PCRE_INCLUDE_DIR PCRE_LIBRARY PCRE_FOUND
|
||||
|
||||
find_path(PCRE_INCLUDE_DIR NAMES pcre.h)
|
||||
find_library(PCRE_LIBRARY NAMES pcre)
|
||||
|
||||
# Properly pass QUIETLY and REQUIRED.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_LIBRARY)
|
||||
find_package_handle_standard_args(PCRE
|
||||
DEFAULT_MSG
|
||||
PCRE_INCLUDE_DIR
|
||||
PCRE_LIBRARY)
|
||||
|
||||
mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARY)
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#
|
||||
# Once done this will define:
|
||||
#
|
||||
# PULSEAUDIO_FOUND - system has the PulseAudio library
|
||||
# PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory
|
||||
# PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio
|
||||
# PULSEAUDIO_FOUND - system has the PulseAudio library PULSEAUDIO_INCLUDE_DIR -
|
||||
# the PulseAudio include directory PULSEAUDIO_LIBRARY - the libraries needed to
|
||||
# use PulseAudio
|
||||
#
|
||||
# Copyright (c) 2008, Matthias Kretz, <[email protected]>
|
||||
#
|
||||
@@ -15,33 +15,36 @@
|
||||
#
|
||||
# There was no COPYING-CMAKE-SCRIPTS file in the repo in question. --wolfman
|
||||
|
||||
if (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(PULSEAUDIO_FIND_QUIETLY TRUE)
|
||||
endif (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
|
||||
if(PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(PULSEAUDIO_FIND_QUIETLY TRUE)
|
||||
endif(PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
|
||||
|
||||
if (NOT WIN32)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PULSEAUDIO libpulse)
|
||||
if(PULSEAUDIO_FOUND)
|
||||
set(PULSEAUDIO_LIBRARY ${PULSEAUDIO_LIBRARIES} CACHE FILEPATH "Path to the PulseAudio library")
|
||||
set(PULSEAUDIO_INCLUDE_DIR ${PULSEAUDIO_INCLUDEDIR} CACHE PATH "Path to the PulseAudio includes")
|
||||
# PULSEAUDIO_DEFINITIONS - Compiler switches required for using PulseAudio
|
||||
# set(PULSEAUDIO_DEFINITIONS ${PULSEAUDIO_CFLAGS})
|
||||
endif(PULSEAUDIO_FOUND)
|
||||
endif (NOT WIN32)
|
||||
if(NOT WIN32)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PULSEAUDIO libpulse)
|
||||
if(PULSEAUDIO_FOUND)
|
||||
set(PULSEAUDIO_LIBRARY ${PULSEAUDIO_LIBRARIES}
|
||||
CACHE FILEPATH "Path to the PulseAudio library")
|
||||
set(PULSEAUDIO_INCLUDE_DIR ${PULSEAUDIO_INCLUDEDIR}
|
||||
CACHE PATH "Path to the PulseAudio includes")
|
||||
# PULSEAUDIO_DEFINITIONS - Compiler switches required for using PulseAudio
|
||||
# set(PULSEAUDIO_DEFINITIONS ${PULSEAUDIO_CFLAGS})
|
||||
endif(PULSEAUDIO_FOUND)
|
||||
endif(NOT WIN32)
|
||||
|
||||
if (NOT PULSEAUDIO_INCLUDE_DIR)
|
||||
FIND_PATH(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h)
|
||||
endif (NOT PULSEAUDIO_INCLUDE_DIR)
|
||||
if(NOT PULSEAUDIO_INCLUDE_DIR)
|
||||
find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h)
|
||||
endif(NOT PULSEAUDIO_INCLUDE_DIR)
|
||||
|
||||
if (NOT PULSEAUDIO_LIBRARY)
|
||||
FIND_LIBRARY(PULSEAUDIO_LIBRARY NAMES pulse)
|
||||
endif (NOT PULSEAUDIO_LIBRARY)
|
||||
if(NOT PULSEAUDIO_LIBRARY)
|
||||
find_library(PULSEAUDIO_LIBRARY NAMES pulse)
|
||||
endif(NOT PULSEAUDIO_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PULSEAUDIO DEFAULT_MSG
|
||||
PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
|
||||
find_package_handle_standard_args(PULSEAUDIO
|
||||
DEFAULT_MSG
|
||||
PULSEAUDIO_INCLUDE_DIR
|
||||
PULSEAUDIO_LIBRARY)
|
||||
|
||||
mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
# The following will be set:
|
||||
|
||||
# VA_INCLUDE_DIR
|
||||
# VA_LIBRARY
|
||||
# VA_FOUND
|
||||
# VA_INCLUDE_DIR VA_LIBRARY VA_FOUND
|
||||
|
||||
find_path(VA_INCLUDE_DIR NAMES va/va.h)
|
||||
|
||||
@@ -12,6 +10,6 @@ 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)
|
||||
find_package_handle_standard_args(VA DEFAULT_MSG VA_LIBRARY VA_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(VA_LIBRARY VA_INCLUDE_DIR)
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
# Borrowed from code.openhub.net
|
||||
|
||||
# Base Io build system
|
||||
# Written by Jeremy Tregunna <[email protected]>
|
||||
# Base Io build system Written by Jeremy Tregunna <[email protected]>
|
||||
#
|
||||
# Find libvorbis.
|
||||
|
||||
FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h)
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/codec.h)
|
||||
|
||||
SET(VORBIS_NAMES ${VORBIS_NAMES} vorbis libvorbis)
|
||||
FIND_LIBRARY(VORBIS_LIBRARY NAMES ${VORBIS_NAMES} PATH)
|
||||
set(VORBIS_NAMES ${VORBIS_NAMES} vorbis libvorbis)
|
||||
find_library(VORBIS_LIBRARY NAMES ${VORBIS_NAMES} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG VORBIS_LIBRARY VORBIS_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(VORBIS
|
||||
DEFAULT_MSG
|
||||
VORBIS_LIBRARY
|
||||
VORBIS_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(VORBIS_LIBRARY VORBIS_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
#
|
||||
# Find libvorbisfile.
|
||||
|
||||
FIND_PATH(VORBISFILE_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
find_path(VORBISFILE_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
|
||||
SET(VORBISFILE_NAMES ${VORBISFILE_NAMES} vorbisfile libvorbisfile)
|
||||
FIND_LIBRARY(VORBISFILE_LIBRARY NAMES ${VORBISFILE_NAMES} PATH)
|
||||
set(VORBISFILE_NAMES ${VORBISFILE_NAMES} vorbisfile libvorbisfile)
|
||||
find_library(VORBISFILE_LIBRARY NAMES ${VORBISFILE_NAMES} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG VORBISFILE_LIBRARY VORBISFILE_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(VORBISFILE
|
||||
DEFAULT_MSG
|
||||
VORBISFILE_LIBRARY
|
||||
VORBISFILE_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(VORBISFILE_LIBRARY VORBISFILE_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
# This is borrowed from FreeRDP.
|
||||
# - Find XINERAMA
|
||||
# Find the XINERAMA libraries
|
||||
# This is borrowed from FreeRDP. - Find XINERAMA Find the XINERAMA libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# XINERAMA_FOUND - true if XINERAMA_INCLUDE_DIR & XINERAMA_LIBRARY are found
|
||||
# XINERAMA_LIBRARIES - Set when XINERAMA_LIBRARY is found
|
||||
# XINERAMA_INCLUDE_DIRS - Set when XINERAMA_INCLUDE_DIR is found
|
||||
# This module defines the following variables: XINERAMA_FOUND - true if
|
||||
# XINERAMA_INCLUDE_DIR & XINERAMA_LIBRARY are found XINERAMA_LIBRARIES - Set
|
||||
# when XINERAMA_LIBRARY is found XINERAMA_INCLUDE_DIRS - Set when
|
||||
# XINERAMA_INCLUDE_DIR is found
|
||||
#
|
||||
# XINERAMA_INCLUDE_DIR - where to find Xinerama.h, etc.
|
||||
# XINERAMA_LIBRARY - the XINERAMA library
|
||||
# XINERAMA_INCLUDE_DIR - where to find Xinerama.h, etc. XINERAMA_LIBRARY -
|
||||
# the XINERAMA library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 O.S. Systems Software Ltda.
|
||||
# Copyright 2011 Otavio Salvador <[email protected]>
|
||||
# Copyright 2011 Marc-Andre Moreau <[email protected]>
|
||||
# =============================================================================
|
||||
# Copyright 2011 O.S. Systems Software Ltda. Copyright 2011 Otavio Salvador
|
||||
# <[email protected]> Copyright 2011 Marc-Andre Moreau
|
||||
# <[email protected]>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
# =============================================================================
|
||||
|
||||
find_path(XINERAMA_INCLUDE_DIR NAMES X11/extensions/Xinerama.h
|
||||
find_path(XINERAMA_INCLUDE_DIR
|
||||
NAMES X11/extensions/Xinerama.h
|
||||
PATHS /opt/X11/include
|
||||
PATH_SUFFIXES X11/extensions
|
||||
DOC "The Xinerama include directory"
|
||||
)
|
||||
DOC "The Xinerama include directory")
|
||||
|
||||
find_library(XINERAMA_LIBRARY NAMES Xinerama
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The Xinerama library"
|
||||
)
|
||||
find_library(XINERAMA_LIBRARY
|
||||
NAMES Xinerama
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The Xinerama library")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xinerama DEFAULT_MSG XINERAMA_LIBRARY XINERAMA_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(Xinerama
|
||||
DEFAULT_MSG
|
||||
XINERAMA_LIBRARY
|
||||
XINERAMA_INCLUDE_DIR)
|
||||
|
||||
if(XINERAMA_FOUND)
|
||||
set( XINERAMA_LIBRARIES ${XINERAMA_LIBRARY} )
|
||||
set( XINERAMA_INCLUDE_DIRS ${XINERAMA_INCLUDE_DIR} )
|
||||
set(XINERAMA_LIBRARIES ${XINERAMA_LIBRARY})
|
||||
set(XINERAMA_INCLUDE_DIRS ${XINERAMA_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(XINERAMA_INCLUDE_DIR XINERAMA_LIBRARY)
|
||||
|
||||
|
||||
@@ -1,44 +1,45 @@
|
||||
# This is borrowed from FreeRDP.
|
||||
# - Find XRANDR
|
||||
# Find the XRANDR libraries
|
||||
# This is borrowed from FreeRDP. - Find XRANDR Find the XRANDR libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# XRANDR_FOUND - true if XRANDR_INCLUDE_DIR & XRANDR_LIBRARY are found
|
||||
# XRANDR_LIBRARIES - Set when XRANDR_LIBRARY is found
|
||||
# XRANDR_INCLUDE_DIRS - Set when XRANDR_INCLUDE_DIR is found
|
||||
# This module defines the following variables: XRANDR_FOUND - true if
|
||||
# XRANDR_INCLUDE_DIR & XRANDR_LIBRARY are found XRANDR_LIBRARIES - Set when
|
||||
# XRANDR_LIBRARY is found XRANDR_INCLUDE_DIRS - Set when XRANDR_INCLUDE_DIR is
|
||||
# found
|
||||
#
|
||||
# XRANDR_INCLUDE_DIR - where to find Xrandr.h, etc.
|
||||
# XRANDR_LIBRARY - the XRANDR library
|
||||
# XRANDR_INCLUDE_DIR - where to find Xrandr.h, etc. XRANDR_LIBRARY - the
|
||||
# XRANDR library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# =============================================================================
|
||||
# Copyright 2012 Alam Arias <[email protected]>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
# =============================================================================
|
||||
|
||||
find_path(XRANDR_INCLUDE_DIRS NAMES X11/extensions/Xrandr.h
|
||||
PATH_SUFFIXES X11/extensions
|
||||
PATHS /opt/X11/include
|
||||
DOC "The XRANDR include directory"
|
||||
)
|
||||
find_path(XRANDR_INCLUDE_DIRS
|
||||
NAMES X11/extensions/Xrandr.h
|
||||
PATH_SUFFIXES X11/extensions
|
||||
PATHS /opt/X11/include
|
||||
DOC "The XRANDR include directory")
|
||||
|
||||
find_library(XRANDR_LIBRARIES NAMES Xrandr
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The XRANDR library"
|
||||
)
|
||||
find_library(XRANDR_LIBRARIES
|
||||
NAMES Xrandr
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The XRANDR library")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRANDR DEFAULT_MSG XRANDR_LIBRARIES XRANDR_INCLUDE_DIRS)
|
||||
find_package_handle_standard_args(XRANDR
|
||||
DEFAULT_MSG
|
||||
XRANDR_LIBRARIES
|
||||
XRANDR_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(XRANDR_INCLUDE_DIRS XRANDR_LIBRARIES)
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(NASM_EXECUTABLE nasm
|
||||
HINTS $ENV{NASM_ROOT} ${NASM_ROOT}
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
HINTS $ENV{NASM_ROOT} ${NASM_ROOT}
|
||||
PATH_SUFFIXES bin)
|
||||
|
||||
find_package_handle_standard_args(nasm DEFAULT_MSG NASM_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(NASM_EXECUTABLE)
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(YASM_EXECUTABLE yasm
|
||||
HINTS $ENV{YASM_ROOT} ${YASM_ROOT}
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
HINTS $ENV{YASM_ROOT} ${YASM_ROOT}
|
||||
PATH_SUFFIXES bin)
|
||||
|
||||
find_package_handle_standard_args(yasm DEFAULT_MSG YASM_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(YASM_EXECUTABLE)
|
||||
|
||||
|
||||
+46
-43
@@ -2,72 +2,75 @@
|
||||
set(SM_VERSION_MAJOR 5)
|
||||
set(SM_VERSION_MINOR 1)
|
||||
set(SM_VERSION_PATCH 0)
|
||||
set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
set(SM_VERSION_TRADITIONAL
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY "${SM_ROOT_DIR}"
|
||||
OUTPUT_VARIABLE SM_VERSION_GIT_HASH
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
WORKING_DIRECTORY "${SM_ROOT_DIR}"
|
||||
OUTPUT_VARIABLE SM_VERSION_GIT_HASH
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT (ret STREQUAL "0"))
|
||||
message(WARNING "git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake.")
|
||||
message(
|
||||
WARNING
|
||||
"git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake."
|
||||
)
|
||||
set(SM_VERSION_GIT_HASH "UNKNOWN")
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_FULL
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}")
|
||||
else()
|
||||
if (WITH_FULL_RELEASE)
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
if(WITH_FULL_RELEASE)
|
||||
set(SM_VERSION_FULL
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
set(SM_VERSION_GIT
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||
else()
|
||||
set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_FULL
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
set(SM_VERSION_GIT
|
||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-git-${SM_VERSION_GIT_HASH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_MAJOR_VERSION STREQUAL "3")
|
||||
if(CMAKE_MAJOR_VERSION STREQUAL "3")
|
||||
# Use the CMake 3 approach whenever possible.
|
||||
string(TIMESTAMP SM_TIMESTAMP_DATE "%Y%m%d")
|
||||
string(TIMESTAMP SM_TIMESTAMP_TIME "%H:%M:%S" UTC)
|
||||
else()
|
||||
if(MSVC)
|
||||
message(STATUS "Getting date and time information via PowerShell. This may take a few seconds.")
|
||||
execute_process(
|
||||
COMMAND powershell get-date -format "{yyyyMMdd}"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_DATE
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
message(
|
||||
STATUS
|
||||
"Getting date and time information via PowerShell. This may take a few seconds."
|
||||
)
|
||||
execute_process(COMMAND powershell get-date -format "{yyyyMMdd}"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_DATE
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND powershell get-date -format "{HH:mm:ss zzz}"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_TIME
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(COMMAND powershell get-date -format "{HH:mm:ss zzz}"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_TIME
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND date "+%Y%m%d"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_DATE
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(COMMAND date "+%Y%m%d"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_DATE
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND date "+%H:%M:%S %z"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_TIME
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(COMMAND date "+%H:%M:%S %z"
|
||||
OUTPUT_VARIABLE SM_TIMESTAMP_TIME
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
if (NOT (ret STREQUAL "0"))
|
||||
if(NOT (ret STREQUAL "0"))
|
||||
set(SM_TIMESTAMP_DATE "xxxxyyzz")
|
||||
endif()
|
||||
|
||||
if (NOT (ret STREQUAL "0"))
|
||||
if(NOT (ret STREQUAL "0"))
|
||||
set(SM_TIMESTAMP_TIME "xx:yy:zz ???")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
+70
-60
@@ -1,91 +1,101 @@
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"You cannot use the Ninja generator when building the bundled ffmpeg library."
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SM_FFMPEG_VERSION "2.1.3")
|
||||
set(SM_FFMPEG_SRC_LIST "${SM_EXTERN_DIR}" "/ffmpeg-linux-" "${SM_FFMPEG_VERSION}")
|
||||
set(SM_FFMPEG_SRC_LIST
|
||||
"${SM_EXTERN_DIR}"
|
||||
"/ffmpeg-linux-"
|
||||
"${SM_FFMPEG_VERSION}")
|
||||
sm_join("${SM_FFMPEG_SRC_LIST}" "" SM_FFMPEG_SRC_DIR)
|
||||
set(SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_SRC_DIR}/configure")
|
||||
if (MINGW)
|
||||
# Borrow from http://stackoverflow.com/q/11845823
|
||||
# string(SUBSTRING ${SM_FFMPEG_CONFIGURE_EXE} 0 1 FIRST_LETTER)
|
||||
# string(TOLOWER ${FIRST_LETTER} FIRST_LETTER_LOW)
|
||||
# string(REPLACE "${FIRST_LETTER}:" "/${FIRST_LETTER_LOW}" # SM_FFMPEG_CONFIGURE_EXE ${SM_FFMPEG_CONFIGURE_EXE})
|
||||
# string(REGEX REPLACE "\\\\" "/" SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_CONFIGURE_EXE}")
|
||||
set(SM_FFMPEG_CONFIGURE_EXE "extern/ffmpeg-linux-${SM_FFMPEG_VERSION}/configure")
|
||||
if(MINGW)
|
||||
# Borrow from http://stackoverflow.com/q/11845823 string(SUBSTRING
|
||||
# ${SM_FFMPEG_CONFIGURE_EXE} 0 1 FIRST_LETTER) string(TOLOWER ${FIRST_LETTER}
|
||||
# FIRST_LETTER_LOW) string(REPLACE "${FIRST_LETTER}:" "/${FIRST_LETTER_LOW}" #
|
||||
# SM_FFMPEG_CONFIGURE_EXE ${SM_FFMPEG_CONFIGURE_EXE}) string(REGEX REPLACE
|
||||
# "\\\\" "/" SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_CONFIGURE_EXE}")
|
||||
set(SM_FFMPEG_CONFIGURE_EXE
|
||||
"extern/ffmpeg-linux-${SM_FFMPEG_VERSION}/configure")
|
||||
endif()
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"${SM_FFMPEG_CONFIGURE_EXE}"
|
||||
"--disable-programs"
|
||||
"--disable-doc"
|
||||
"--disable-avdevice"
|
||||
"--disable-swresample"
|
||||
"--disable-postproc"
|
||||
"--disable-avfilter"
|
||||
"--disable-shared"
|
||||
"--enable-static"
|
||||
)
|
||||
"${SM_FFMPEG_CONFIGURE_EXE}"
|
||||
"--disable-programs"
|
||||
"--disable-doc"
|
||||
"--disable-avdevice"
|
||||
"--disable-swresample"
|
||||
"--disable-postproc"
|
||||
"--disable-avfilter"
|
||||
"--disable-shared"
|
||||
"--enable-static")
|
||||
|
||||
if(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
list(APPEND FFMPEG_CONFIGURE "--enable-pic")
|
||||
list(APPEND FFMPEG_CONFIGURE "--enable-pic")
|
||||
endif()
|
||||
|
||||
if(MACOSX)
|
||||
# TODO: Remove these two items when Mac OS X StepMania builds in 64-bit.
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--arch=i386"
|
||||
"--cc=clang -m32"
|
||||
)
|
||||
|
||||
find_program(
|
||||
FFMPEG_YASM_EXECUTABLE
|
||||
yasm
|
||||
PATHS /usr/bin /usr/local/bin /opt/local/bin)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--yasmexe=${FFMPEG_YASM_EXECUTABLE}"
|
||||
)
|
||||
find_program(FFMPEG_YASM_EXECUTABLE yasm
|
||||
PATHS /usr/bin /usr/local/bin /opt/local/bin)
|
||||
list(APPEND FFMPEG_CONFIGURE "--yasmexe=${FFMPEG_YASM_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
if(WITH_GPL_LIBS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--enable-gpl"
|
||||
)
|
||||
list(APPEND FFMPEG_CONFIGURE "--enable-gpl")
|
||||
endif()
|
||||
|
||||
if (WITH_CRYSTALHD_DISABLED)
|
||||
if(WITH_CRYSTALHD_DISABLED)
|
||||
list(APPEND FFMPEG_CONFIGURE "--disable-crystalhd")
|
||||
endif()
|
||||
|
||||
if (NOT WITH_EXTERNAL_WARNINGS)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--extra-cflags=-w"
|
||||
)
|
||||
if(NOT WITH_EXTERNAL_WARNINGS)
|
||||
list(APPEND FFMPEG_CONFIGURE "--extra-cflags=-w")
|
||||
endif()
|
||||
|
||||
list(APPEND SM_FFMPEG_MAKE
|
||||
$(MAKE)
|
||||
)
|
||||
if (WITH_FFMPEG_JOBS GREATER 0)
|
||||
list(APPEND SM_FFMPEG_MAKE $(MAKE))
|
||||
if(WITH_FFMPEG_JOBS GREATER 0)
|
||||
list(APPEND SM_FFMPEG_MAKE "-j${WITH_FFMPEG_JOBS}")
|
||||
endif()
|
||||
|
||||
if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
if(IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
externalproject_add("ffmpeg"
|
||||
SOURCE_DIR "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
|
||||
BUILD_COMMAND "${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
SOURCE_DIR
|
||||
"${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND
|
||||
${FFMPEG_CONFIGURE}
|
||||
BUILD_COMMAND
|
||||
"${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND
|
||||
""
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
TEST_COMMAND
|
||||
"")
|
||||
else()
|
||||
# --shlibdir=$our_installdir/stepmania-$VERSION
|
||||
externalproject_add("ffmpeg"
|
||||
DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://github.com/stepmania/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}"
|
||||
BUILD_COMMAND "${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
DOWNLOAD_COMMAND
|
||||
git
|
||||
clone
|
||||
"--branch"
|
||||
"n${SM_FFMPEG_VERSION}"
|
||||
"--depth"
|
||||
"1"
|
||||
"git://github.com/stepmania/ffmpeg.git"
|
||||
"${SM_FFMPEG_SRC_DIR}"
|
||||
CONFIGURE_COMMAND
|
||||
"${FFMPEG_CONFIGURE}"
|
||||
BUILD_COMMAND
|
||||
"${SM_FFMPEG_MAKE}"
|
||||
UPDATE_COMMAND
|
||||
""
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
TEST_COMMAND
|
||||
"")
|
||||
endif()
|
||||
|
||||
externalproject_get_property("ffmpeg" BINARY_DIR)
|
||||
set(SM_FFMPEG_ROOT ${BINARY_DIR})
|
||||
|
||||
|
||||
+72
-27
@@ -1,16 +1,23 @@
|
||||
set(SM_OGG_SRC_DIR "${SM_EXTERN_DIR}/libogg-git")
|
||||
|
||||
if (NOT (IS_DIRECTORY "${SM_OGG_SRC_DIR}"))
|
||||
message(ERROR "Submodule for ogg missing. Run git submodule init && git submodule update first.")
|
||||
if(NOT (IS_DIRECTORY "${SM_OGG_SRC_DIR}"))
|
||||
message(
|
||||
ERROR
|
||||
"Submodule for ogg missing. Run git submodule init && git submodule update first."
|
||||
)
|
||||
endif()
|
||||
|
||||
externalproject_add("ogg"
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
SOURCE_DIR "${SM_OGG_SRC_DIR}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
SOURCE_DIR
|
||||
"${SM_OGG_SRC_DIR}"
|
||||
UPDATE_COMMAND
|
||||
""
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
TEST_COMMAND
|
||||
"")
|
||||
|
||||
externalproject_get_property("ogg" BINARY_DIR)
|
||||
set(SM_OGG_ROOT ${BINARY_DIR})
|
||||
@@ -21,27 +28,48 @@ if(APPLE AND CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
||||
# necessary for the time being.
|
||||
externalproject_add_step("ogg"
|
||||
fix-path
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}
|
||||
DEPENDEES build)
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-E
|
||||
make_directory
|
||||
${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}
|
||||
DEPENDEES
|
||||
build)
|
||||
externalproject_add_step("ogg"
|
||||
copy-libogg
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${SM_OGG_ROOT}/libogg.a ${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES fix-path)
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-E
|
||||
copy
|
||||
${SM_OGG_ROOT}/libogg.a
|
||||
${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES
|
||||
fix-path)
|
||||
endif()
|
||||
|
||||
set(SM_VORBIS_SRC_DIR "${SM_EXTERN_DIR}/libvorbis-git")
|
||||
|
||||
if (NOT (IS_DIRECTORY "${SM_VORBIS_SRC_DIR}"))
|
||||
message(ERROR "Submodule for vorbis missing. Run git submodule init && git submodule update first.")
|
||||
if(NOT (IS_DIRECTORY "${SM_VORBIS_SRC_DIR}"))
|
||||
message(
|
||||
ERROR
|
||||
"Submodule for vorbis missing. Run git submodule init && git submodule update first."
|
||||
)
|
||||
endif()
|
||||
|
||||
externalproject_add("vorbis"
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DOGG_INCLUDE_DIRS:STRING=${SM_OGG_INCLUDE_DIR} -DOGG_LIBRARIES:STRING=${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}/libogg.a
|
||||
SOURCE_DIR "${SM_VORBIS_SRC_DIR}"
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
externalproject_add(
|
||||
"vorbis"
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DOGG_INCLUDE_DIRS:STRING=${SM_OGG_INCLUDE_DIR}
|
||||
-DOGG_LIBRARIES:STRING=${SM_OGG_ROOT}/${CMAKE_BUILD_TYPE}/libogg.a
|
||||
SOURCE_DIR
|
||||
"${SM_VORBIS_SRC_DIR}"
|
||||
UPDATE_COMMAND
|
||||
""
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
TEST_COMMAND
|
||||
"")
|
||||
|
||||
externalproject_get_property("vorbis" BINARY_DIR)
|
||||
set(SM_VORBIS_ROOT ${BINARY_DIR})
|
||||
@@ -51,16 +79,33 @@ if(APPLE AND CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
||||
# See note above
|
||||
externalproject_add_step("vorbis"
|
||||
fix-path
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}
|
||||
DEPENDEES build)
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-E
|
||||
make_directory
|
||||
${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}
|
||||
DEPENDEES
|
||||
build)
|
||||
externalproject_add_step("vorbis"
|
||||
copy-libvorbis
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${SM_VORBIS_ROOT}/lib/libvorbis.a ${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES fix-path)
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-E
|
||||
copy
|
||||
${SM_VORBIS_ROOT}/lib/libvorbis.a
|
||||
${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES
|
||||
fix-path)
|
||||
externalproject_add_step("vorbis"
|
||||
copy-libvorbisfile
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${SM_VORBIS_ROOT}/lib/libvorbisfile.a ${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES fix-path)
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-E
|
||||
copy
|
||||
${SM_VORBIS_ROOT}/lib/libvorbisfile.a
|
||||
${SM_VORBIS_ROOT}/lib/${CMAKE_BUILD_TYPE}/
|
||||
DEPENDEES
|
||||
fix-path)
|
||||
endif()
|
||||
|
||||
add_dependencies("vorbis" "ogg")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SMDefs.cmake")
|
||||
|
||||
# SM_TIMESTAMP_DATE and SM_TIMESTAMP_TIME, needed for the stub, are prepared/generated as we want them in SMDefs
|
||||
configure_file(
|
||||
"${SM_SRC_DIR}/version_updater/verstub.cpp.in"
|
||||
"${SM_SRC_DIR}/generated/verstub.cpp"
|
||||
)
|
||||
# SM_TIMESTAMP_DATE and SM_TIMESTAMP_TIME, needed for the stub, are
|
||||
# prepared/generated as we want them in SMDefs
|
||||
configure_file("${SM_SRC_DIR}/version_updater/verstub.cpp.in"
|
||||
"${SM_SRC_DIR}/generated/verstub.cpp")
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(StepMania)
|
||||
|
||||
include (StepmaniaCore.cmake)
|
||||
include(StepmaniaCore.cmake)
|
||||
|
||||
# The external libraries need to be included.
|
||||
add_subdirectory(extern)
|
||||
|
||||
+463
-450
@@ -1,450 +1,463 @@
|
||||
# Include the macros and functions.
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMake/CMakeMacros.cmake)
|
||||
|
||||
# Set up helper variables for future configuring.
|
||||
set(SM_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/CMake")
|
||||
set(SM_EXTERN_DIR "${CMAKE_CURRENT_LIST_DIR}/extern")
|
||||
set(SM_INSTALLER_DIR "${CMAKE_CURRENT_LIST_DIR}/Installer")
|
||||
set(SM_XCODE_DIR "${CMAKE_CURRENT_LIST_DIR}/Xcode")
|
||||
set(SM_PROGRAM_DIR "${CMAKE_CURRENT_LIST_DIR}/Program")
|
||||
set(SM_BUILD_DIR "${CMAKE_CURRENT_LIST_DIR}/Build")
|
||||
set(SM_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/src")
|
||||
set(SM_DOC_DIR "${CMAKE_CURRENT_LIST_DIR}/Docs")
|
||||
set(SM_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# TODO: Reconsile the OS dependent naming scheme.
|
||||
set(SM_EXE_NAME "StepMania")
|
||||
|
||||
# Some OS specific helpers.
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(LINUX TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++11")
|
||||
else()
|
||||
set(LINUX FALSE)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
set(MACOSX TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++14")
|
||||
else()
|
||||
set(MACOSX FALSE)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "BSD")
|
||||
set(BSD TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++11")
|
||||
else()
|
||||
set(BSD FALSE)
|
||||
endif()
|
||||
|
||||
# Allow for finding our libraries in a standard location.
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" "${SM_CMAKE_DIR}/Modules/")
|
||||
|
||||
include("${SM_CMAKE_DIR}/DefineOptions.cmake")
|
||||
|
||||
include("${SM_CMAKE_DIR}/SMDefs.cmake")
|
||||
|
||||
# Put the predefined targets in separate groups.
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Set up the linker flags for MSVC builds.
|
||||
configure_msvc_runtime()
|
||||
|
||||
# Checks the standard include directories for c-style headers.
|
||||
# We may use C++ in this project, but the check works better with plain C headers.
|
||||
include(CheckIncludeFiles)
|
||||
check_include_files(alloca.h HAVE_ALLOCA_H)
|
||||
check_include_files(assert.h HAVE_ASSERT_H)
|
||||
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||
check_include_files(dirent.h HAVE_DIRENT_H)
|
||||
check_include_files(errno.h HAVE_ERRNO_H)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(float.h HAVE_FLOAT_H)
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(limits.h HAVE_LIMITS_H)
|
||||
check_include_files(math.h HAVE_MATH_H)
|
||||
check_include_files(memory.h HAVE_MEMORY_H)
|
||||
check_include_files(stdarg.h HAVE_STDARG_H)
|
||||
check_include_files(stddef.h HAVE_STDDEF_H)
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
|
||||
check_include_files(endian.h HAVE_ENDIAN_H)
|
||||
check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
|
||||
check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
|
||||
|
||||
if (HAVE_STDLIB_H AND HAVE_STDARG_H AND HAVE_STRING_H AND HAVE_FLOAT_H)
|
||||
set(STDC_HEADERS 1)
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCXXSymbolExists)
|
||||
|
||||
# Mostly Windows functions.
|
||||
check_function_exists(_mkdir HAVE__MKDIR)
|
||||
check_cxx_symbol_exists(_snprintf cstdio HAVE__SNPRINTF)
|
||||
check_cxx_symbol_exists(stricmp cstring HAVE_STRICMP)
|
||||
check_cxx_symbol_exists(_stricmp cstring HAVE__STRICMP)
|
||||
|
||||
# Mostly non-Windows functions.
|
||||
check_function_exists(fcntl HAVE_FCNTL)
|
||||
check_function_exists(fork HAVE_FORK)
|
||||
check_function_exists(mkdir HAVE_MKDIR)
|
||||
check_cxx_symbol_exists(snprintf cstdio HAVE_SNPRINTF)
|
||||
check_cxx_symbol_exists(strcasecmp cstring HAVE_STRCASECMP)
|
||||
check_function_exists(waitpid HAVE_WAITPID)
|
||||
|
||||
|
||||
# Mostly universal symbols.
|
||||
check_cxx_symbol_exists(powf cmath HAVE_POWF)
|
||||
check_cxx_symbol_exists(sqrtf cmath HAVE_SQRTF)
|
||||
check_cxx_symbol_exists(sinf cmath HAVE_SINF)
|
||||
check_cxx_symbol_exists(tanf cmath HAVE_TANF)
|
||||
check_cxx_symbol_exists(cosf cmath HAVE_COSF)
|
||||
check_cxx_symbol_exists(acosf cmath HAVE_ACOSF)
|
||||
check_cxx_symbol_exists(truncf cmath HAVE_TRUNCF)
|
||||
check_cxx_symbol_exists(roundf cmath HAVE_ROUNDF)
|
||||
check_cxx_symbol_exists(lrintf cmath HAVE_LRINTF)
|
||||
check_cxx_symbol_exists(strtof cstdlib HAVE_STRTOF)
|
||||
check_symbol_exists(M_PI math.h HAVE_M_PI)
|
||||
check_symbol_exists(size_t stddef.h HAVE_SIZE_T_STDDEF)
|
||||
check_symbol_exists(size_t stdlib.h HAVE_SIZE_T_STDLIB)
|
||||
check_symbol_exists(size_t stdio.h HAVE_SIZE_T_STDIO)
|
||||
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
|
||||
|
||||
if (MINGW)
|
||||
set(NEED_WINDOWS_LOADING_WINDOW TRUE)
|
||||
check_symbol_exists(PBS_MARQUEE commctrl.h HAVE_PBS_MARQUEE)
|
||||
check_symbol_exists(PBM_SETMARQUEE commctrl.h HAVE_PBM_SETMARQUEE)
|
||||
endif()
|
||||
|
||||
# Checks to make it easier to work with 32-bit/64-bit builds if required.
|
||||
include(CheckTypeSize)
|
||||
check_type_size(int16_t SIZEOF_INT16_T)
|
||||
check_type_size(uint16_t SIZEOF_UINT16_T)
|
||||
check_type_size(u_int16_t SIZEOF_U_INT16_T)
|
||||
check_type_size(int32_t SIZEOF_INT32_T)
|
||||
check_type_size(uint32_t SIZEOF_UINT32_T)
|
||||
check_type_size(u_int32_t SIZEOF_U_INT32_T)
|
||||
check_type_size(int64_t SIZEOF_INT64_T)
|
||||
check_type_size(char SIZEOF_CHAR)
|
||||
check_type_size("unsigned char" SIZEOF_UNSIGNED_CHAR)
|
||||
check_type_size(short SIZEOF_SHORT)
|
||||
check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
|
||||
check_type_size(int SIZEOF_INT)
|
||||
check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
|
||||
check_type_size(long SIZEOF_LONG)
|
||||
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size(float SIZEOF_FLOAT)
|
||||
check_type_size(double SIZEOF_DOUBLE)
|
||||
check_type_size(intptr_t SIZEOF_INTPTR_T)
|
||||
check_type_size(pid_t SIZEOF_PID_T)
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(BIGENDIAN)
|
||||
if (${BIGENDIAN})
|
||||
set(ENDIAN_BIG 1)
|
||||
else()
|
||||
set(ENDIAN_LITTLE 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_prototype.c" "Checking for function prototype capabilities" "found" "not found" SM_IGNORED_PROTOTYPE_CALL FALSE)
|
||||
|
||||
if(NOT SM_IGNORED_PROTOTYPE_CALL)
|
||||
set(HAVE_PROTOTYPES TRUE)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_external.c" "Checking for external name shortening requirements" "not needed" "needed" SM_BUILT_LONG_NAME TRUE)
|
||||
|
||||
if (NOT SM_BUILT_LONG_NAME)
|
||||
set(NEED_SHORT_EXTERNAL_NAMES 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode" "${SM_CMAKE_DIR}/TestCode/test_broken.c" "Checking if incomplete types are broken." "not broken" "broken" SM_BUILT_INCOMPLETE_TYPE FALSE)
|
||||
|
||||
if (SM_BUILT_INCOMPLETE_TYPE)
|
||||
set(INCOMPLETE_TYPES_BROKEN 1)
|
||||
endif()
|
||||
|
||||
# Dependencies go here.
|
||||
include(ExternalProject)
|
||||
|
||||
if(NOT WITH_GPL_LIBS)
|
||||
message("Disabling GPL exclusive libraries: no MP3 support.")
|
||||
set(WITH_MP3 OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_WAV)
|
||||
# TODO: Identify which headers to check for ensuring this will always work.
|
||||
set(HAS_WAV TRUE)
|
||||
endif()
|
||||
|
||||
if(WITH_MP3)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_MP3 TRUE)
|
||||
else()
|
||||
find_package(Mad)
|
||||
if(NOT LIBMAD_FOUND)
|
||||
message(FATAL_ERROR "Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_MP3 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OGG)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_OGG TRUE)
|
||||
else()
|
||||
find_package(Ogg)
|
||||
find_package(Vorbis)
|
||||
find_package(VorbisFile)
|
||||
|
||||
if(NOT (OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND) )
|
||||
message(FATAL_ERROR "Not all vorbis libraries were found. If you wish to skip vorbis support, set WITH_OGG to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_OGG TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
|
||||
find_package(SDL2)
|
||||
|
||||
if(NOT SDL2_FOUND)
|
||||
message(FATAL_ERROR "SDL2 Library was not found. If you wish to compile without SDL2, set WITH_SDL to OFF when configuring.")
|
||||
else()
|
||||
set(HAS_SDL TRUE)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
find_package(nasm)
|
||||
find_package(yasm)
|
||||
|
||||
find_package(BZip2)
|
||||
if (NOT ${BZIP2_FOUND} AND NOT MSVC)
|
||||
message(FATAL_ERROR "Bzip2 support required.")
|
||||
endif()
|
||||
|
||||
find_package(Iconv)
|
||||
|
||||
find_package(Threads)
|
||||
if (${Threads_FOUND})
|
||||
set(HAS_PTHREAD TRUE)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES pthread)
|
||||
check_symbol_exists(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
check_symbol_exists(pthread_cond_timedwait pthread.h HAVE_PTHREAD_COND_TIMEDWAIT)
|
||||
else()
|
||||
set(HAS_PTHREAD FALSE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(SYSTEM_PCRE_FOUND FALSE)
|
||||
find_package(DirectX REQUIRED)
|
||||
|
||||
if (MINGW AND WITH_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
else()
|
||||
# FFMPEG...it can be evil.
|
||||
find_library(LIB_SWSCALE NAMES "swscale"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_SWSCALE ${LIB_SWSCALE} NAME)
|
||||
|
||||
find_library(LIB_AVCODEC NAMES "avcodec"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVCODEC ${LIB_AVCODEC} NAME)
|
||||
|
||||
find_library(LIB_AVFORMAT NAMES "avformat"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVFORMAT ${LIB_AVFORMAT} NAME)
|
||||
|
||||
find_library(LIB_AVUTIL NAMES "avutil"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
|
||||
)
|
||||
get_filename_component(LIB_AVUTIL ${LIB_AVUTIL} NAME)
|
||||
endif()
|
||||
elseif(MACOSX)
|
||||
|
||||
if (WITH_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
|
||||
set(SYSTEM_PCRE_FOUND FALSE)
|
||||
set(WITH_CRASH_HANDLER TRUE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET_FULL "10.9.0")
|
||||
|
||||
find_library(MAC_FRAME_ACCELERATE Accelerate ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_APPKIT AppKit ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_AUDIOTOOLBOX AudioToolbox ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_AUDIOUNIT AudioUnit ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_CARBON Carbon ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_COCOA Cocoa ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_COREAUDIO CoreAudio ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_COREFOUNDATION CoreFoundation ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_CORESERVICES CoreServices ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_FOUNDATION Foundation ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_IOKIT IOKit ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_OPENGL OpenGL ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
find_library(MAC_FRAME_QUICKTIME QuickTime ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
||||
|
||||
mark_as_advanced(
|
||||
MAC_FRAME_ACCELERATE
|
||||
MAC_FRAME_APPKIT
|
||||
MAC_FRAME_AUDIOTOOLBOX
|
||||
MAC_FRAME_AUDIOUNIT
|
||||
MAC_FRAME_CARBON
|
||||
MAC_FRAME_COCOA
|
||||
MAC_FRAME_COREAUDIO
|
||||
MAC_FRAME_COREFOUNDATION
|
||||
MAC_FRAME_CORESERVICES
|
||||
MAC_FRAME_FOUNDATION
|
||||
MAC_FRAME_IOKIT
|
||||
MAC_FRAME_OPENGL
|
||||
MAC_FRAME_QUICKTIME
|
||||
)
|
||||
elseif(LINUX)
|
||||
if(WITH_GTK2)
|
||||
find_package("GTK2" 2.0)
|
||||
if (${GTK2_FOUND})
|
||||
set(HAS_GTK2 TRUE)
|
||||
else()
|
||||
set(HAS_GTK2 FALSE)
|
||||
message("GTK2 was not found on your system. There will be no loading window.")
|
||||
endif()
|
||||
else()
|
||||
set(HAS_GTK2 FALSE)
|
||||
endif()
|
||||
|
||||
find_package(X11)
|
||||
if(${X11_FOUND})
|
||||
set(HAS_X11 TRUE)
|
||||
else()
|
||||
set(HAS_X11 FALSE)
|
||||
endif()
|
||||
|
||||
find_package(Pcre)
|
||||
set(SYSTEM_PCRE_FOUND ${PCRE_FOUND})
|
||||
|
||||
find_package("ZLIB")
|
||||
if (NOT(${ZLIB_FOUND}))
|
||||
message(FATAL_ERROR "zlib support required.")
|
||||
endif()
|
||||
|
||||
find_package("JPEG")
|
||||
if(NOT(${JPEG_FOUND}))
|
||||
message(FATAL_ERROR "jpeg support required.")
|
||||
endif()
|
||||
|
||||
find_package(Dl)
|
||||
|
||||
find_package(Xrandr REQUIRED)
|
||||
if (${XRANDR_FOUND})
|
||||
set(HAS_XRANDR TRUE)
|
||||
else()
|
||||
set(HAS_XRANDR FALSE)
|
||||
endif()
|
||||
|
||||
find_package(Xinerama)
|
||||
if (${XINERAMA_FOUND})
|
||||
set(HAS_XINERAMA TRUE)
|
||||
else()
|
||||
set(HAS_XINERAMA FALSE)
|
||||
endif()
|
||||
|
||||
find_package(PulseAudio)
|
||||
if (PULSEAUDIO_FOUND)
|
||||
set(HAS_PULSE TRUE)
|
||||
else()
|
||||
set(HAS_PULSE FALSE)
|
||||
endif()
|
||||
|
||||
find_package(ALSA)
|
||||
if (ALSA_FOUND)
|
||||
set(HAS_ALSA TRUE)
|
||||
else()
|
||||
set(HAS_ALSA FALSE)
|
||||
endif()
|
||||
|
||||
find_package(JACK)
|
||||
if (JACK_FOUND)
|
||||
set(HAS_JACK TRUE)
|
||||
else()
|
||||
set(HAS_JACK FALSE)
|
||||
endif()
|
||||
|
||||
find_package(OSS)
|
||||
if (OSS_FOUND)
|
||||
set(HAS_OSS TRUE)
|
||||
else()
|
||||
set(HAS_OSS FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT OSS_FOUND AND NOT JACK_FOUND AND NOT ALSA_FOUND AND NOT PULSE_FOUND)
|
||||
message(FATAL_ERROR "No sound libraries found. You will require at least one.")
|
||||
else()
|
||||
message(STATUS "-- At least one sound library was found. Do not worry if any were not found at this stage.")
|
||||
endif()
|
||||
|
||||
if (WITH_FFMPEG AND NOT YASM_FOUND AND NOT NASM_FOUND)
|
||||
message("Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support.")
|
||||
set(WITH_FFMPEG OFF)
|
||||
endif()
|
||||
|
||||
find_package("Va")
|
||||
|
||||
if(WITH_FFMPEG)
|
||||
if (WITH_SYSTEM_FFMPEG)
|
||||
find_package("FFMPEG")
|
||||
if(NOT FFMPEG_FOUND)
|
||||
message(FATAL_ERROR "System ffmpeg not found! Either install the libraries or remove the argument, then try again.")
|
||||
else()
|
||||
|
||||
message(STATUS "-- Warning! Your version of ffmpeg may be too high! If you want to use the system ffmpeg, clear your cmake cache and do not include the system ffmpeg argument.")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(HAS_FFMPEG FALSE)
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
if (NOT ${OPENGL_FOUND})
|
||||
message(FATAL_ERROR "OpenGL required to compile StepMania.")
|
||||
endif()
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
if (NOT ${GLEW_FOUND})
|
||||
message(FATAL_ERROR "GLEW required to compile StepMania.")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
configure_file("${SM_SRC_DIR}/config.in.hpp" "${SM_SRC_DIR}/generated/config.hpp")
|
||||
configure_file("${SM_SRC_DIR}/verstub.in.cpp" "${SM_SRC_DIR}/generated/verstub.cpp")
|
||||
|
||||
# Define installer based items for cpack.
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMake/CPackSetup.cmake")
|
||||
# Include the macros and functions.
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMake/CMakeMacros.cmake)
|
||||
|
||||
# Make Xcode's 'Archive' build work
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/extern")
|
||||
|
||||
# Set up helper variables for future configuring.
|
||||
set(SM_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/CMake")
|
||||
set(SM_EXTERN_DIR "${CMAKE_CURRENT_LIST_DIR}/extern")
|
||||
set(SM_INSTALLER_DIR "${CMAKE_CURRENT_LIST_DIR}/Installer")
|
||||
set(SM_XCODE_DIR "${CMAKE_CURRENT_LIST_DIR}/Xcode")
|
||||
set(SM_PROGRAM_DIR "${CMAKE_CURRENT_LIST_DIR}/Program")
|
||||
set(SM_BUILD_DIR "${CMAKE_CURRENT_LIST_DIR}/Build")
|
||||
set(SM_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/src")
|
||||
set(SM_DOC_DIR "${CMAKE_CURRENT_LIST_DIR}/Docs")
|
||||
set(SM_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# TODO: Reconsile the OS dependent naming scheme.
|
||||
set(SM_EXE_NAME "StepMania")
|
||||
|
||||
# Some OS specific helpers.
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(LINUX TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++11")
|
||||
else()
|
||||
set(LINUX FALSE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
set(MACOSX TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++14")
|
||||
else()
|
||||
set(MACOSX FALSE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "BSD")
|
||||
set(BSD TRUE)
|
||||
set(SM_CPP_STANDARD "gnu++11")
|
||||
else()
|
||||
set(BSD FALSE)
|
||||
endif()
|
||||
|
||||
# Allow for finding our libraries in a standard location.
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}"
|
||||
"${SM_CMAKE_DIR}/Modules/")
|
||||
|
||||
include("${SM_CMAKE_DIR}/DefineOptions.cmake")
|
||||
|
||||
include("${SM_CMAKE_DIR}/SMDefs.cmake")
|
||||
|
||||
# Set up the linker flags for MSVC builds.
|
||||
configure_msvc_runtime()
|
||||
|
||||
# Checks the standard include directories for c-style headers. We may use C++ in
|
||||
# this project, but the check works better with plain C headers.
|
||||
include(CheckIncludeFiles)
|
||||
check_include_files(alloca.h HAVE_ALLOCA_H)
|
||||
check_include_files(assert.h HAVE_ASSERT_H)
|
||||
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||
check_include_files(dirent.h HAVE_DIRENT_H)
|
||||
check_include_files(errno.h HAVE_ERRNO_H)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(float.h HAVE_FLOAT_H)
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(limits.h HAVE_LIMITS_H)
|
||||
check_include_files(math.h HAVE_MATH_H)
|
||||
check_include_files(memory.h HAVE_MEMORY_H)
|
||||
check_include_files(stdarg.h HAVE_STDARG_H)
|
||||
check_include_files(stddef.h HAVE_STDDEF_H)
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
|
||||
check_include_files(endian.h HAVE_ENDIAN_H)
|
||||
check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
|
||||
check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
|
||||
|
||||
if(HAVE_STDLIB_H AND HAVE_STDARG_H AND HAVE_STRING_H AND HAVE_FLOAT_H)
|
||||
set(STDC_HEADERS 1)
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCXXSymbolExists)
|
||||
|
||||
# Mostly Windows functions.
|
||||
check_function_exists(_mkdir HAVE__MKDIR)
|
||||
check_cxx_symbol_exists(_snprintf cstdio HAVE__SNPRINTF)
|
||||
check_cxx_symbol_exists(stricmp cstring HAVE_STRICMP)
|
||||
check_cxx_symbol_exists(_stricmp cstring HAVE__STRICMP)
|
||||
|
||||
# Mostly non-Windows functions.
|
||||
check_function_exists(fcntl HAVE_FCNTL)
|
||||
check_function_exists(fork HAVE_FORK)
|
||||
check_function_exists(mkdir HAVE_MKDIR)
|
||||
check_cxx_symbol_exists(snprintf cstdio HAVE_SNPRINTF)
|
||||
check_cxx_symbol_exists(strcasecmp cstring HAVE_STRCASECMP)
|
||||
check_function_exists(waitpid HAVE_WAITPID)
|
||||
|
||||
# Mostly universal symbols.
|
||||
check_cxx_symbol_exists(powf cmath HAVE_POWF)
|
||||
check_cxx_symbol_exists(sqrtf cmath HAVE_SQRTF)
|
||||
check_cxx_symbol_exists(sinf cmath HAVE_SINF)
|
||||
check_cxx_symbol_exists(tanf cmath HAVE_TANF)
|
||||
check_cxx_symbol_exists(cosf cmath HAVE_COSF)
|
||||
check_cxx_symbol_exists(acosf cmath HAVE_ACOSF)
|
||||
check_cxx_symbol_exists(truncf cmath HAVE_TRUNCF)
|
||||
check_cxx_symbol_exists(roundf cmath HAVE_ROUNDF)
|
||||
check_cxx_symbol_exists(lrintf cmath HAVE_LRINTF)
|
||||
check_cxx_symbol_exists(strtof cstdlib HAVE_STRTOF)
|
||||
check_symbol_exists(M_PI math.h HAVE_M_PI)
|
||||
check_symbol_exists(size_t stddef.h HAVE_SIZE_T_STDDEF)
|
||||
check_symbol_exists(size_t stdlib.h HAVE_SIZE_T_STDLIB)
|
||||
check_symbol_exists(size_t stdio.h HAVE_SIZE_T_STDIO)
|
||||
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
|
||||
|
||||
if(MINGW)
|
||||
set(NEED_WINDOWS_LOADING_WINDOW TRUE)
|
||||
check_symbol_exists(PBS_MARQUEE commctrl.h HAVE_PBS_MARQUEE)
|
||||
check_symbol_exists(PBM_SETMARQUEE commctrl.h HAVE_PBM_SETMARQUEE)
|
||||
endif()
|
||||
|
||||
# Checks to make it easier to work with 32-bit/64-bit builds if required.
|
||||
include(CheckTypeSize)
|
||||
check_type_size(int16_t SIZEOF_INT16_T)
|
||||
check_type_size(uint16_t SIZEOF_UINT16_T)
|
||||
check_type_size(u_int16_t SIZEOF_U_INT16_T)
|
||||
check_type_size(int32_t SIZEOF_INT32_T)
|
||||
check_type_size(uint32_t SIZEOF_UINT32_T)
|
||||
check_type_size(u_int32_t SIZEOF_U_INT32_T)
|
||||
check_type_size(int64_t SIZEOF_INT64_T)
|
||||
check_type_size(char SIZEOF_CHAR)
|
||||
check_type_size("unsigned char" SIZEOF_UNSIGNED_CHAR)
|
||||
check_type_size(short SIZEOF_SHORT)
|
||||
check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
|
||||
check_type_size(int SIZEOF_INT)
|
||||
check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
|
||||
check_type_size(long SIZEOF_LONG)
|
||||
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size(float SIZEOF_FLOAT)
|
||||
check_type_size(double SIZEOF_DOUBLE)
|
||||
check_type_size(intptr_t SIZEOF_INTPTR_T)
|
||||
check_type_size(pid_t SIZEOF_PID_T)
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(BIGENDIAN)
|
||||
if(${BIGENDIAN})
|
||||
set(ENDIAN_BIG 1)
|
||||
else()
|
||||
set(ENDIAN_LITTLE 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode"
|
||||
"${SM_CMAKE_DIR}/TestCode/test_prototype.c"
|
||||
"Checking for function prototype capabilities"
|
||||
"found"
|
||||
"not found"
|
||||
SM_IGNORED_PROTOTYPE_CALL
|
||||
FALSE)
|
||||
|
||||
if(NOT SM_IGNORED_PROTOTYPE_CALL)
|
||||
set(HAVE_PROTOTYPES TRUE)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode"
|
||||
"${SM_CMAKE_DIR}/TestCode/test_external.c"
|
||||
"Checking for external name shortening requirements"
|
||||
"not needed"
|
||||
"needed"
|
||||
SM_BUILT_LONG_NAME
|
||||
TRUE)
|
||||
|
||||
if(NOT SM_BUILT_LONG_NAME)
|
||||
set(NEED_SHORT_EXTERNAL_NAMES 1)
|
||||
endif()
|
||||
|
||||
check_compile_features("${SM_CMAKE_DIR}/TestCode"
|
||||
"${SM_CMAKE_DIR}/TestCode/test_broken.c"
|
||||
"Checking if incomplete types are broken."
|
||||
"not broken"
|
||||
"broken"
|
||||
SM_BUILT_INCOMPLETE_TYPE
|
||||
FALSE)
|
||||
|
||||
if(SM_BUILT_INCOMPLETE_TYPE)
|
||||
set(INCOMPLETE_TYPES_BROKEN 1)
|
||||
endif()
|
||||
|
||||
# Dependencies go here.
|
||||
include(ExternalProject)
|
||||
|
||||
if(NOT WITH_GPL_LIBS)
|
||||
message("Disabling GPL exclusive libraries: no MP3 support.")
|
||||
set(WITH_MP3 OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_WAV)
|
||||
# TODO: Identify which headers to check for ensuring this will always work.
|
||||
set(HAS_WAV TRUE)
|
||||
endif()
|
||||
|
||||
if(WITH_MP3)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_MP3 TRUE)
|
||||
else()
|
||||
find_package(Mad)
|
||||
if(NOT LIBMAD_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring."
|
||||
)
|
||||
else()
|
||||
set(HAS_MP3 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif(WITH_MP3)
|
||||
|
||||
if(WITH_OGG)
|
||||
if(WIN32 OR MACOSX)
|
||||
set(HAS_OGG TRUE)
|
||||
else()
|
||||
find_package(Ogg)
|
||||
find_package(Vorbis)
|
||||
find_package(VorbisFile)
|
||||
|
||||
if(NOT (OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND))
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Not all vorbis libraries were found. If you wish to skip vorbis support, set WITH_OGG to OFF when configuring."
|
||||
)
|
||||
else()
|
||||
set(HAS_OGG TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
find_package(SDL2 REQUIRED)
|
||||
set(HAS_SDL TRUE)
|
||||
endif()
|
||||
|
||||
find_package(nasm)
|
||||
find_package(yasm)
|
||||
|
||||
find_package(BZip2)
|
||||
if(NOT ${BZIP2_FOUND} AND NOT MSVC)
|
||||
message(FATAL_ERROR "Bzip2 support required.")
|
||||
endif()
|
||||
|
||||
find_package(Iconv)
|
||||
|
||||
find_package(Threads)
|
||||
if(${Threads_FOUND})
|
||||
set(HAS_PTHREAD TRUE)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES pthread)
|
||||
check_symbol_exists(pthread_mutex_timedlock pthread.h
|
||||
HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
check_symbol_exists(pthread_cond_timedwait pthread.h
|
||||
HAVE_PTHREAD_COND_TIMEDWAIT)
|
||||
else()
|
||||
set(HAS_PTHREAD FALSE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(DirectX REQUIRED)
|
||||
|
||||
if(MINGW AND WITH_FFMPEG AND NOT WITH_SYSTEM_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
else()
|
||||
# FFMPEG...it can be evil.
|
||||
find_library(LIB_SWSCALE
|
||||
NAMES "swscale"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(LIB_SWSCALE ${LIB_SWSCALE} NAME)
|
||||
|
||||
find_library(LIB_AVCODEC
|
||||
NAMES "avcodec"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(LIB_AVCODEC ${LIB_AVCODEC} NAME)
|
||||
|
||||
find_library(LIB_AVFORMAT
|
||||
NAMES "avformat"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(LIB_AVFORMAT ${LIB_AVFORMAT} NAME)
|
||||
|
||||
find_library(LIB_AVUTIL
|
||||
NAMES "avutil"
|
||||
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(LIB_AVUTIL ${LIB_AVUTIL} NAME)
|
||||
endif()
|
||||
elseif(MACOSX)
|
||||
if(WITH_FFMPEG AND NOT WITH_SYSTEM_FFMPEG)
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
|
||||
set(WITH_CRASH_HANDLER TRUE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET_FULL "10.9.0")
|
||||
|
||||
find_library(MAC_FRAME_ACCELERATE Accelerate ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_APPKIT AppKit ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_AUDIOTOOLBOX AudioToolbox
|
||||
${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_AUDIOUNIT AudioUnit ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_CARBON Carbon ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_COCOA Cocoa ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_COREAUDIO CoreAudio ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_COREFOUNDATION CoreFoundation
|
||||
${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_CORESERVICES CoreServices
|
||||
${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_FOUNDATION Foundation ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_IOKIT IOKit ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_OPENGL OpenGL ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
find_library(MAC_FRAME_SYSTEM System ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
|
||||
|
||||
mark_as_advanced(MAC_FRAME_ACCELERATE
|
||||
MAC_FRAME_APPKIT
|
||||
MAC_FRAME_AUDIOTOOLBOX
|
||||
MAC_FRAME_AUDIOUNIT
|
||||
MAC_FRAME_CARBON
|
||||
MAC_FRAME_COCOA
|
||||
MAC_FRAME_COREAUDIO
|
||||
MAC_FRAME_COREFOUNDATION
|
||||
MAC_FRAME_CORESERVICES
|
||||
MAC_FRAME_FOUNDATION
|
||||
MAC_FRAME_IOKIT
|
||||
MAC_FRAME_OPENGL
|
||||
MAC_FRAME_SYSTEM)
|
||||
elseif(LINUX)
|
||||
if(WITH_GTK2)
|
||||
find_package("GTK2" 2.0)
|
||||
if(${GTK2_FOUND})
|
||||
set(HAS_GTK2 TRUE)
|
||||
else()
|
||||
set(HAS_GTK2 FALSE)
|
||||
message(
|
||||
"GTK2 was not found on your system. There will be no loading window.")
|
||||
endif()
|
||||
else()
|
||||
set(HAS_GTK2 FALSE)
|
||||
endif()
|
||||
|
||||
set(HAS_X11 FALSE)
|
||||
if(WITH_X11)
|
||||
find_package(X11 REQUIRED)
|
||||
set(HAS_X11 TRUE)
|
||||
endif()
|
||||
|
||||
find_package("ZLIB" REQUIRED)
|
||||
find_package("JPEG" REQUIRED)
|
||||
|
||||
find_package(Dl)
|
||||
|
||||
set(HAS_XRANDR FALSE)
|
||||
if(WITH_XRANDR)
|
||||
find_package(Xrandr REQUIRED)
|
||||
set(HAS_XRANDR TRUE)
|
||||
endif()
|
||||
|
||||
set(HAS_XINERAMA FALSE)
|
||||
if(WITH_XINERAMA)
|
||||
find_package(Xinerama REQUIRED)
|
||||
set(HAS_XINERAMA TRUE)
|
||||
endif()
|
||||
|
||||
set(HAS_PULSE FALSE)
|
||||
if(WITH_PULSEAUDIO)
|
||||
find_package(PulseAudio REQUIRED)
|
||||
set(HAS_PULSE TRUE)
|
||||
endif()
|
||||
|
||||
set(HAS_ALSA FALSE)
|
||||
if(WITH_ALSA)
|
||||
find_package(ALSA REQUIRED)
|
||||
set(HAS_ALSA TRUE)
|
||||
endif()
|
||||
|
||||
set(HAS_JACK FALSE)
|
||||
if(WITH_JACK)
|
||||
find_package(JACK REQUIRED)
|
||||
set(HAS_JACK TRUE)
|
||||
endif()
|
||||
|
||||
set(HAS_OSS FALSE)
|
||||
if(WITH_OSS)
|
||||
find_package(OSS)
|
||||
set(HAS_OSS TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT OSS_FOUND AND NOT JACK_FOUND AND NOT ALSA_FOUND AND NOT PULSE_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"No sound libraries found (or selected). You will require at least one."
|
||||
)
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"-- At least one sound library was found. Do not worry if any were not found at this stage."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_FFMPEG AND NOT YASM_FOUND AND NOT NASM_FOUND)
|
||||
message(
|
||||
"Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support."
|
||||
)
|
||||
set(WITH_FFMPEG OFF)
|
||||
endif()
|
||||
|
||||
find_package("Va")
|
||||
|
||||
if(WITH_FFMPEG)
|
||||
if(WITH_SYSTEM_FFMPEG)
|
||||
find_package("FFMPEG")
|
||||
if(NOT FFMPEG_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"System ffmpeg not found! Either install the libraries or remove the argument, then try again."
|
||||
)
|
||||
else()
|
||||
|
||||
message(
|
||||
STATUS
|
||||
"-- Warning! Your version of ffmpeg may be too high! If you want to use the system ffmpeg, clear your cmake cache and do not include the system ffmpeg argument."
|
||||
)
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
|
||||
set(HAS_FFMPEG TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(HAS_FFMPEG FALSE)
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(GLEW REQUIRED)
|
||||
endif(WIN32) # LINUX, APPLE
|
||||
|
||||
configure_file("${SM_SRC_DIR}/config.in.hpp"
|
||||
"${SM_SRC_DIR}/generated/config.hpp")
|
||||
configure_file("${SM_SRC_DIR}/verstub.in.cpp"
|
||||
"${SM_SRC_DIR}/generated/verstub.cpp")
|
||||
|
||||
# Define installer based items for cpack.
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMake/CPackSetup.cmake")
|
||||
|
||||
Vendored
+14
-13
@@ -1,20 +1,21 @@
|
||||
include(CMakeProject-lua.cmake)
|
||||
include(CMakeProject-glew.cmake)
|
||||
include(CMakeProject-json.cmake)
|
||||
if (APPLE OR MSVC)
|
||||
include(CMakeProject-mad.cmake)
|
||||
include(CMakeProject-zlib.cmake)
|
||||
include(CMakeProject-jpeg.cmake)
|
||||
endif()
|
||||
if (MSVC AND WITH_OGG)
|
||||
include(CMakeProject-ogg.cmake)
|
||||
include(CMakeProject-vorbis.cmake)
|
||||
include(CMakeProject-vorbisfile.cmake)
|
||||
endif()
|
||||
if (NOT SYSTEM_PCRE_FOUND)
|
||||
include(CMakeProject-pcre.cmake)
|
||||
include(CMakeProject-mad.cmake)
|
||||
include(CMakeProject-zlib.cmake)
|
||||
include(CMakeProject-jpeg.cmake)
|
||||
if(WITH_OGG)
|
||||
if(WITH_SYSTEM_OGG)
|
||||
find_package(Ogg REQUIRED)
|
||||
find_package(Vorbis REQUIRED)
|
||||
find_package(VorbisFile REQUIRED)
|
||||
else()
|
||||
include(CMakeProject-ogg.cmake)
|
||||
include(CMakeProject-vorbis.cmake)
|
||||
include(CMakeProject-vorbisfile.cmake)
|
||||
endif()
|
||||
endif()
|
||||
include(CMakeProject-pcre.cmake)
|
||||
include(CMakeProject-tomcrypt.cmake)
|
||||
include(CMakeProject-tommath.cmake)
|
||||
include(CMakeProject-png.cmake)
|
||||
|
||||
|
||||
Vendored
+14
-15
@@ -1,15 +1,14 @@
|
||||
if (NOT IS_DIRECTORY "${SM_EXTERN_DIR}/cppformat")
|
||||
message(ERROR "Submodule for cppformat missing. Run git submodule init && git submodule update first.")
|
||||
if(NOT IS_DIRECTORY "${SM_EXTERN_DIR}/cppformat")
|
||||
message(
|
||||
ERROR
|
||||
"Submodule for cppformat missing. Run git submodule init && git submodule update first."
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(APPEND CPPFORMAT_SRC
|
||||
"cppformat/fmt/format.cc"
|
||||
)
|
||||
list(APPEND CPPFORMAT_SRC "cppformat/fmt/format.cc")
|
||||
|
||||
list(APPEND CPPFORMAT_HPP
|
||||
"cppformat/fmt/format.h"
|
||||
)
|
||||
list(APPEND CPPFORMAT_HPP "cppformat/fmt/format.h")
|
||||
|
||||
source_group("" FILES ${CPPFORMAT_SRC} ${CPPFORMAT_HPP})
|
||||
|
||||
@@ -21,19 +20,19 @@ disable_project_warnings("cppformat")
|
||||
|
||||
target_include_directories("cppformat" PUBLIC "cppformat")
|
||||
|
||||
if (MSVC)
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("cppformat" _CRT_SECURE_NO_WARNINGS)
|
||||
elseif(APPLE)
|
||||
set_target_properties("cppformat" PROPERTIES
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "${SM_CPP_STANDARD}"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"
|
||||
)
|
||||
set_target_properties("cppformat"
|
||||
PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD
|
||||
"${SM_CPP_STANDARD}"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY
|
||||
"libc++")
|
||||
sm_add_compile_flag("cppformat" "-std=${SM_CPP_STANDARD}")
|
||||
sm_add_compile_flag("cppformat" "-stdlib=libc++")
|
||||
else() # Unix
|
||||
sm_add_compile_flag("cppformat" "-std=${SM_CPP_STANDARD}")
|
||||
if (CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
sm_add_compile_flag("cppformat" "-stdlib=libc++")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Vendored
+15
-9
@@ -1,16 +1,22 @@
|
||||
set(GLEW_SRC "glew-1.5.8/src/glew.c")
|
||||
if(WITH_SYSTEM_GLEW)
|
||||
find_package(GLEW REQUIRED)
|
||||
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
else()
|
||||
|
||||
source_group("" FILES ${GLEW_SRC})
|
||||
set(GLEW_SRC "glew-1.5.8/src/glew.c")
|
||||
|
||||
add_library("glew" STATIC ${GLEW_SRC})
|
||||
source_group("" FILES ${GLEW_SRC})
|
||||
|
||||
set_property(TARGET "glew" PROPERTY FOLDER "External Libraries")
|
||||
add_library("glew" STATIC ${GLEW_SRC})
|
||||
|
||||
target_include_directories("glew" PUBLIC "glew-1.5.8/include")
|
||||
set_property(TARGET "glew" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
sm_add_compile_definition("glew" GLEW_STATIC)
|
||||
target_include_directories("glew" PUBLIC "glew-1.5.8/include")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("glew" _MBCS)
|
||||
endif(MSVC)
|
||||
sm_add_compile_definition("glew" GLEW_STATIC)
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("glew" _MBCS)
|
||||
endif(MSVC)
|
||||
|
||||
endif()
|
||||
|
||||
Vendored
+82
-80
@@ -1,83 +1,85 @@
|
||||
set(JPEG_DIR "${SM_EXTERN_DIR}/libjpeg")
|
||||
if(WITH_SYSTEM_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
set(JPEG_LIBRARIES ${JPEG_LIBRARIES} PARENT_SCOPE)
|
||||
else()
|
||||
set(JPEG_DIR "${SM_EXTERN_DIR}/libjpeg")
|
||||
|
||||
configure_file("${SM_EXTERN_DIR}/config.jpeg.in.h" "${JPEG_DIR}/jconfig.h")
|
||||
configure_file("${SM_EXTERN_DIR}/config.jpeg.in.h" "${JPEG_DIR}/jconfig.h")
|
||||
|
||||
if (NOT HAVE_PROTOTYPES)
|
||||
list(APPEND JPEG_SRC "${JPEG_DIR}/ansi2knr.c")
|
||||
if(NOT HAVE_PROTOTYPES)
|
||||
list(APPEND JPEG_SRC "${JPEG_DIR}/ansi2knr.c")
|
||||
endif()
|
||||
|
||||
list(APPEND JPEG_SRC
|
||||
"${JPEG_DIR}/jaricom.c"
|
||||
"${JPEG_DIR}/jcapimin.c"
|
||||
"${JPEG_DIR}/jcapistd.c"
|
||||
"${JPEG_DIR}/jcarith.c"
|
||||
"${JPEG_DIR}/jccoefct.c"
|
||||
"${JPEG_DIR}/jccolor.c"
|
||||
"${JPEG_DIR}/jcdctmgr.c"
|
||||
"${JPEG_DIR}/jchuff.c"
|
||||
"${JPEG_DIR}/jcinit.c"
|
||||
"${JPEG_DIR}/jcmainct.c"
|
||||
"${JPEG_DIR}/jcmarker.c"
|
||||
"${JPEG_DIR}/jcmaster.c"
|
||||
"${JPEG_DIR}/jcomapi.c"
|
||||
"${JPEG_DIR}/jcparam.c"
|
||||
"${JPEG_DIR}/jcprepct.c"
|
||||
"${JPEG_DIR}/jcsample.c"
|
||||
"${JPEG_DIR}/jctrans.c"
|
||||
"${JPEG_DIR}/jdapimin.c"
|
||||
"${JPEG_DIR}/jdapistd.c"
|
||||
"${JPEG_DIR}/jdarith.c"
|
||||
"${JPEG_DIR}/jdatadst.c"
|
||||
"${JPEG_DIR}/jdcoefct.c"
|
||||
"${JPEG_DIR}/jdcolor.c"
|
||||
"${JPEG_DIR}/jddctmgr.c"
|
||||
"${JPEG_DIR}/jdhuff.c"
|
||||
"${JPEG_DIR}/jdinput.c"
|
||||
"${JPEG_DIR}/jdmainct.c"
|
||||
"${JPEG_DIR}/jdmarker.c"
|
||||
"${JPEG_DIR}/jdmaster.c"
|
||||
"${JPEG_DIR}/jdmerge.c"
|
||||
"${JPEG_DIR}/jdpostct.c"
|
||||
"${JPEG_DIR}/jdsample.c"
|
||||
"${JPEG_DIR}/jdtrans.c"
|
||||
"${JPEG_DIR}/jerror.c"
|
||||
"${JPEG_DIR}/jfdctflt.c"
|
||||
"${JPEG_DIR}/jfdctfst.c"
|
||||
"${JPEG_DIR}/jfdctint.c"
|
||||
"${JPEG_DIR}/jutils.c"
|
||||
"${JPEG_DIR}/jidctflt.c"
|
||||
"${JPEG_DIR}/jidctfst.c"
|
||||
"${JPEG_DIR}/jidctint.c"
|
||||
"${JPEG_DIR}/jmemmgr.c"
|
||||
"${JPEG_DIR}/jmemnobs.c"
|
||||
"${JPEG_DIR}/jquant1.c"
|
||||
"${JPEG_DIR}/jquant2.c")
|
||||
|
||||
list(APPEND JPEG_HPP
|
||||
"${JPEG_DIR}/jconfig.h"
|
||||
"${JPEG_DIR}/jdct.h"
|
||||
"${JPEG_DIR}/jerror.h"
|
||||
"${JPEG_DIR}/jinclude.h"
|
||||
"${JPEG_DIR}/jmemsys.h"
|
||||
"${JPEG_DIR}/jmorecfg.h"
|
||||
"${JPEG_DIR}/jpegint.h"
|
||||
"${JPEG_DIR}/jpeglib.h"
|
||||
"${JPEG_DIR}/jversion.h")
|
||||
|
||||
source_group("Source Files" FILES ${JPEG_SRC})
|
||||
source_group("Header Files" FILES ${JPEG_HPP})
|
||||
|
||||
add_library("jpeg" ${JPEG_SRC} ${JPEG_HPP})
|
||||
|
||||
disable_project_warnings("jpeg")
|
||||
|
||||
set_property(TARGET "jpeg" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("jpeg" _CRT_SECURE_NO_WARNINGS)
|
||||
endif(MSVC)
|
||||
|
||||
target_include_directories("jpeg" PUBLIC "${JPEG_DIR}")
|
||||
endif()
|
||||
|
||||
list(APPEND JPEG_SRC
|
||||
"${JPEG_DIR}/jaricom.c"
|
||||
"${JPEG_DIR}/jcapimin.c"
|
||||
"${JPEG_DIR}/jcapistd.c"
|
||||
"${JPEG_DIR}/jcarith.c"
|
||||
"${JPEG_DIR}/jccoefct.c"
|
||||
"${JPEG_DIR}/jccolor.c"
|
||||
"${JPEG_DIR}/jcdctmgr.c"
|
||||
"${JPEG_DIR}/jchuff.c"
|
||||
"${JPEG_DIR}/jcinit.c"
|
||||
"${JPEG_DIR}/jcmainct.c"
|
||||
"${JPEG_DIR}/jcmarker.c"
|
||||
"${JPEG_DIR}/jcmaster.c"
|
||||
"${JPEG_DIR}/jcomapi.c"
|
||||
"${JPEG_DIR}/jcparam.c"
|
||||
"${JPEG_DIR}/jcprepct.c"
|
||||
"${JPEG_DIR}/jcsample.c"
|
||||
"${JPEG_DIR}/jctrans.c"
|
||||
"${JPEG_DIR}/jdapimin.c"
|
||||
"${JPEG_DIR}/jdapistd.c"
|
||||
"${JPEG_DIR}/jdarith.c"
|
||||
"${JPEG_DIR}/jdatadst.c"
|
||||
"${JPEG_DIR}/jdcoefct.c"
|
||||
"${JPEG_DIR}/jdcolor.c"
|
||||
"${JPEG_DIR}/jddctmgr.c"
|
||||
"${JPEG_DIR}/jdhuff.c"
|
||||
"${JPEG_DIR}/jdinput.c"
|
||||
"${JPEG_DIR}/jdmainct.c"
|
||||
"${JPEG_DIR}/jdmarker.c"
|
||||
"${JPEG_DIR}/jdmaster.c"
|
||||
"${JPEG_DIR}/jdmerge.c"
|
||||
"${JPEG_DIR}/jdpostct.c"
|
||||
"${JPEG_DIR}/jdsample.c"
|
||||
"${JPEG_DIR}/jdtrans.c"
|
||||
"${JPEG_DIR}/jerror.c"
|
||||
"${JPEG_DIR}/jfdctflt.c"
|
||||
"${JPEG_DIR}/jfdctfst.c"
|
||||
"${JPEG_DIR}/jfdctint.c"
|
||||
"${JPEG_DIR}/jutils.c"
|
||||
"${JPEG_DIR}/jidctflt.c"
|
||||
"${JPEG_DIR}/jidctfst.c"
|
||||
"${JPEG_DIR}/jidctint.c"
|
||||
"${JPEG_DIR}/jmemmgr.c"
|
||||
"${JPEG_DIR}/jmemnobs.c"
|
||||
"${JPEG_DIR}/jquant1.c"
|
||||
"${JPEG_DIR}/jquant2.c"
|
||||
)
|
||||
|
||||
list(APPEND JPEG_HPP
|
||||
"${JPEG_DIR}/jconfig.h"
|
||||
"${JPEG_DIR}/jdct.h"
|
||||
"${JPEG_DIR}/jerror.h"
|
||||
"${JPEG_DIR}/jinclude.h"
|
||||
"${JPEG_DIR}/jmemsys.h"
|
||||
"${JPEG_DIR}/jmorecfg.h"
|
||||
"${JPEG_DIR}/jpegint.h"
|
||||
"${JPEG_DIR}/jpeglib.h"
|
||||
"${JPEG_DIR}/jversion.h"
|
||||
)
|
||||
|
||||
source_group("Source Files" FILES ${JPEG_SRC})
|
||||
source_group("Header Files" FILES ${JPEG_HPP})
|
||||
|
||||
add_library("jpeg" ${JPEG_SRC} ${JPEG_HPP})
|
||||
|
||||
disable_project_warnings("jpeg")
|
||||
|
||||
set_property(TARGET "jpeg" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("jpeg" _CRT_SECURE_NO_WARNINGS)
|
||||
endif(MSVC)
|
||||
|
||||
target_include_directories("jpeg" PUBLIC "${JPEG_DIR}")
|
||||
|
||||
|
||||
Vendored
+37
-32
@@ -1,42 +1,47 @@
|
||||
list(APPEND JSON_SRC
|
||||
"jsoncpp/src/lib_json/json_reader.cpp"
|
||||
"jsoncpp/src/lib_json/json_value.cpp"
|
||||
"jsoncpp/src/lib_json/json_writer.cpp"
|
||||
)
|
||||
if(WITH_SYSTEM_JSONCPP)
|
||||
find_library(JSONCPP_LIBRARY jsoncpp)
|
||||
if(JSONCPP_LIBRARY MATCHES "JSONCPP_LIBRARY-NOTFOUND")
|
||||
message(FATAL_ERROR "Need jsoncpp.")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND JSON_SRC
|
||||
"jsoncpp/src/lib_json/json_reader.cpp"
|
||||
"jsoncpp/src/lib_json/json_value.cpp"
|
||||
"jsoncpp/src/lib_json/json_writer.cpp")
|
||||
|
||||
list(APPEND JSON_HPP
|
||||
"jsoncpp/include/json/config.h"
|
||||
"jsoncpp/include/json/features.h"
|
||||
"jsoncpp/include/json/forwards.h"
|
||||
"jsoncpp/include/json/json.h"
|
||||
"jsoncpp/include/json/reader.h"
|
||||
"jsoncpp/include/json/value.h"
|
||||
"jsoncpp/include/json/writer.h"
|
||||
)
|
||||
list(APPEND JSON_HPP
|
||||
"jsoncpp/include/json/config.h"
|
||||
"jsoncpp/include/json/features.h"
|
||||
"jsoncpp/include/json/forwards.h"
|
||||
"jsoncpp/include/json/json.h"
|
||||
"jsoncpp/include/json/reader.h"
|
||||
"jsoncpp/include/json/value.h"
|
||||
"jsoncpp/include/json/writer.h")
|
||||
|
||||
source_group("" FILES ${JSON_SRC} ${JSON_HPP})
|
||||
source_group("" FILES ${JSON_SRC} ${JSON_HPP})
|
||||
|
||||
add_library("jsoncpp" STATIC ${JSON_SRC} ${JSON_HPP})
|
||||
add_library("jsoncpp" STATIC ${JSON_SRC} ${JSON_HPP})
|
||||
|
||||
set_property(TARGET "jsoncpp" PROPERTY FOLDER "External Libraries")
|
||||
set_property(TARGET "jsoncpp" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("jsoncpp")
|
||||
disable_project_warnings("jsoncpp")
|
||||
|
||||
target_include_directories("jsoncpp" PUBLIC "jsoncpp/include")
|
||||
target_include_directories("jsoncpp" PUBLIC "jsoncpp/include")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("jsoncpp" _CRT_SECURE_NO_WARNINGS)
|
||||
elseif(APPLE)
|
||||
set_target_properties("jsoncpp" PROPERTIES
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++14"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"
|
||||
)
|
||||
sm_add_compile_flag("jsoncpp" "-std=${SM_CPP_STANDARD}")
|
||||
sm_add_compile_flag("jsoncpp" "-stdlib=libc++")
|
||||
else() # Unix/Linux
|
||||
sm_add_compile_flag("jsoncpp" "-std=gnu++11")
|
||||
if (CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("jsoncpp" _CRT_SECURE_NO_WARNINGS)
|
||||
elseif(APPLE)
|
||||
set_target_properties("jsoncpp"
|
||||
PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD
|
||||
"gnu++14"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY
|
||||
"libc++")
|
||||
sm_add_compile_flag("jsoncpp" "-std=${SM_CPP_STANDARD}")
|
||||
sm_add_compile_flag("jsoncpp" "-stdlib=libc++")
|
||||
else() # Unix/Linux
|
||||
sm_add_compile_flag("jsoncpp" "-std=gnu++11")
|
||||
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
sm_add_compile_flag("jsoncpp" "-stdlib=libc++")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Vendored
+51
-54
@@ -1,59 +1,57 @@
|
||||
set(LUA_SRC
|
||||
"lua-5.1/src/lapi.c"
|
||||
"lua-5.1/src/lauxlib.c"
|
||||
"lua-5.1/src/lbaselib.c"
|
||||
"lua-5.1/src/lcode.c"
|
||||
"lua-5.1/src/ldblib.c"
|
||||
"lua-5.1/src/ldebug.c"
|
||||
"lua-5.1/src/ldo.c"
|
||||
"lua-5.1/src/ldump.c"
|
||||
"lua-5.1/src/lfunc.c"
|
||||
"lua-5.1/src/lgc.c"
|
||||
"lua-5.1/src/linit.c"
|
||||
"lua-5.1/src/liolib.c"
|
||||
"lua-5.1/src/llex.c"
|
||||
"lua-5.1/src/lmathlib.c"
|
||||
"lua-5.1/src/lmem.c"
|
||||
"lua-5.1/src/loadlib.c"
|
||||
"lua-5.1/src/lobject.c"
|
||||
"lua-5.1/src/lopcodes.c"
|
||||
"lua-5.1/src/loslib.c"
|
||||
"lua-5.1/src/lparser.c"
|
||||
"lua-5.1/src/lstate.c"
|
||||
"lua-5.1/src/lstring.c"
|
||||
"lua-5.1/src/lstrlib.c"
|
||||
"lua-5.1/src/ltable.c"
|
||||
"lua-5.1/src/ltablib.c"
|
||||
"lua-5.1/src/ltm.c"
|
||||
"lua-5.1/src/lundump.c"
|
||||
"lua-5.1/src/lvm.c"
|
||||
"lua-5.1/src/lzio.c"
|
||||
)
|
||||
"lua-5.1/src/lapi.c"
|
||||
"lua-5.1/src/lauxlib.c"
|
||||
"lua-5.1/src/lbaselib.c"
|
||||
"lua-5.1/src/lcode.c"
|
||||
"lua-5.1/src/ldblib.c"
|
||||
"lua-5.1/src/ldebug.c"
|
||||
"lua-5.1/src/ldo.c"
|
||||
"lua-5.1/src/ldump.c"
|
||||
"lua-5.1/src/lfunc.c"
|
||||
"lua-5.1/src/lgc.c"
|
||||
"lua-5.1/src/linit.c"
|
||||
"lua-5.1/src/liolib.c"
|
||||
"lua-5.1/src/llex.c"
|
||||
"lua-5.1/src/lmathlib.c"
|
||||
"lua-5.1/src/lmem.c"
|
||||
"lua-5.1/src/loadlib.c"
|
||||
"lua-5.1/src/lobject.c"
|
||||
"lua-5.1/src/lopcodes.c"
|
||||
"lua-5.1/src/loslib.c"
|
||||
"lua-5.1/src/lparser.c"
|
||||
"lua-5.1/src/lstate.c"
|
||||
"lua-5.1/src/lstring.c"
|
||||
"lua-5.1/src/lstrlib.c"
|
||||
"lua-5.1/src/ltable.c"
|
||||
"lua-5.1/src/ltablib.c"
|
||||
"lua-5.1/src/ltm.c"
|
||||
"lua-5.1/src/lundump.c"
|
||||
"lua-5.1/src/lvm.c"
|
||||
"lua-5.1/src/lzio.c")
|
||||
|
||||
set(LUA_HPP
|
||||
"lua-5.1/src/lapi.h"
|
||||
"lua-5.1/src/lauxlib.h"
|
||||
"lua-5.1/src/lcode.h"
|
||||
"lua-5.1/src/ldebug.h"
|
||||
"lua-5.1/src/lfunc.h"
|
||||
"lua-5.1/src/lgc.h"
|
||||
"lua-5.1/src/llex.h"
|
||||
"lua-5.1/src/llimits.h"
|
||||
"lua-5.1/src/lmem.h"
|
||||
"lua-5.1/src/lobject.h"
|
||||
"lua-5.1/src/lopcodes.h"
|
||||
"lua-5.1/src/lparser.h"
|
||||
"lua-5.1/src/lstate.h"
|
||||
"lua-5.1/src/lstring.h"
|
||||
"lua-5.1/src/ltable.h"
|
||||
"lua-5.1/src/ltm.h"
|
||||
"lua-5.1/src/lua.h"
|
||||
"lua-5.1/src/luaconf.h"
|
||||
"lua-5.1/src/lualib.h"
|
||||
"lua-5.1/src/lundump.h"
|
||||
"lua-5.1/src/lvm.h"
|
||||
"lua-5.1/src/lzio.h"
|
||||
)
|
||||
"lua-5.1/src/lapi.h"
|
||||
"lua-5.1/src/lauxlib.h"
|
||||
"lua-5.1/src/lcode.h"
|
||||
"lua-5.1/src/ldebug.h"
|
||||
"lua-5.1/src/lfunc.h"
|
||||
"lua-5.1/src/lgc.h"
|
||||
"lua-5.1/src/llex.h"
|
||||
"lua-5.1/src/llimits.h"
|
||||
"lua-5.1/src/lmem.h"
|
||||
"lua-5.1/src/lobject.h"
|
||||
"lua-5.1/src/lopcodes.h"
|
||||
"lua-5.1/src/lparser.h"
|
||||
"lua-5.1/src/lstate.h"
|
||||
"lua-5.1/src/lstring.h"
|
||||
"lua-5.1/src/ltable.h"
|
||||
"lua-5.1/src/ltm.h"
|
||||
"lua-5.1/src/lua.h"
|
||||
"lua-5.1/src/luaconf.h"
|
||||
"lua-5.1/src/lualib.h"
|
||||
"lua-5.1/src/lundump.h"
|
||||
"lua-5.1/src/lvm.h"
|
||||
"lua-5.1/src/lzio.h")
|
||||
|
||||
source_group("" FILES ${LUA_SRC})
|
||||
source_group("" FILES ${LUA_HPP})
|
||||
@@ -69,4 +67,3 @@ if(MSVC)
|
||||
endif(MSVC)
|
||||
|
||||
disable_project_warnings("lua-5.1")
|
||||
|
||||
|
||||
Vendored
+68
-66
@@ -1,75 +1,77 @@
|
||||
set(MAD_DIR "${SM_EXTERN_DIR}/mad-0.15.1b")
|
||||
if(WITH_SYSTEM_MAD)
|
||||
find_package(Mad REQUIRED)
|
||||
else()
|
||||
set(MAD_DIR "${SM_EXTERN_DIR}/mad-0.15.1b")
|
||||
|
||||
list(APPEND MAD_SRC
|
||||
"${MAD_DIR}/bit.c"
|
||||
"${MAD_DIR}/decoder.c"
|
||||
"${MAD_DIR}/fixed.c"
|
||||
"${MAD_DIR}/frame.c"
|
||||
"${MAD_DIR}/huffman.c"
|
||||
"${MAD_DIR}/layer12.c"
|
||||
"${MAD_DIR}/layer3.c"
|
||||
"${MAD_DIR}/stream.c"
|
||||
"${MAD_DIR}/synth.c"
|
||||
"${MAD_DIR}/timer.c"
|
||||
"${MAD_DIR}/version.c"
|
||||
)
|
||||
list(APPEND MAD_SRC
|
||||
"${MAD_DIR}/bit.c"
|
||||
"${MAD_DIR}/decoder.c"
|
||||
"${MAD_DIR}/fixed.c"
|
||||
"${MAD_DIR}/frame.c"
|
||||
"${MAD_DIR}/huffman.c"
|
||||
"${MAD_DIR}/layer12.c"
|
||||
"${MAD_DIR}/layer3.c"
|
||||
"${MAD_DIR}/stream.c"
|
||||
"${MAD_DIR}/synth.c"
|
||||
"${MAD_DIR}/timer.c"
|
||||
"${MAD_DIR}/version.c")
|
||||
|
||||
list(APPEND MAD_HPP
|
||||
"${MAD_DIR}/bit.h"
|
||||
"${MAD_DIR}/config.h"
|
||||
"${MAD_DIR}/decoder.h"
|
||||
"${MAD_DIR}/fixed.h"
|
||||
"${MAD_DIR}/frame.h"
|
||||
"${MAD_DIR}/global.h"
|
||||
"${MAD_DIR}/huffman.h"
|
||||
"${MAD_DIR}/layer12.h"
|
||||
"${MAD_DIR}/layer3.h"
|
||||
"${MAD_DIR}/mad.h"
|
||||
"${MAD_DIR}/stream.h"
|
||||
"${MAD_DIR}/synth.h"
|
||||
"${MAD_DIR}/timer.h"
|
||||
"${MAD_DIR}/version.h"
|
||||
)
|
||||
list(APPEND MAD_HPP
|
||||
"${MAD_DIR}/bit.h"
|
||||
"${MAD_DIR}/config.h"
|
||||
"${MAD_DIR}/decoder.h"
|
||||
"${MAD_DIR}/fixed.h"
|
||||
"${MAD_DIR}/frame.h"
|
||||
"${MAD_DIR}/global.h"
|
||||
"${MAD_DIR}/huffman.h"
|
||||
"${MAD_DIR}/layer12.h"
|
||||
"${MAD_DIR}/layer3.h"
|
||||
"${MAD_DIR}/mad.h"
|
||||
"${MAD_DIR}/stream.h"
|
||||
"${MAD_DIR}/synth.h"
|
||||
"${MAD_DIR}/timer.h"
|
||||
"${MAD_DIR}/version.h")
|
||||
|
||||
list(APPEND MAD_DAT
|
||||
"${MAD_DIR}/D.dat"
|
||||
"${MAD_DIR}/imdct_s.dat"
|
||||
"${MAD_DIR}/qc_table.dat"
|
||||
"${MAD_DIR}/rq_table.dat"
|
||||
"${MAD_DIR}/sf_table.dat"
|
||||
)
|
||||
list(APPEND MAD_DAT
|
||||
"${MAD_DIR}/D.dat"
|
||||
"${MAD_DIR}/imdct_s.dat"
|
||||
"${MAD_DIR}/qc_table.dat"
|
||||
"${MAD_DIR}/rq_table.dat"
|
||||
"${MAD_DIR}/sf_table.dat")
|
||||
|
||||
source_group("Source Files" FILES ${MAD_SRC})
|
||||
source_group("Header Files" FILES ${MAD_HPP})
|
||||
source_group("Data Files" FILES ${MAD_DAT})
|
||||
source_group("Source Files" FILES ${MAD_SRC})
|
||||
source_group("Header Files" FILES ${MAD_HPP})
|
||||
source_group("Data Files" FILES ${MAD_DAT})
|
||||
|
||||
add_library("mad" STATIC ${MAD_SRC} ${MAD_HPP} ${MAD_DAT})
|
||||
add_library("mad" STATIC ${MAD_SRC} ${MAD_HPP} ${MAD_DAT})
|
||||
|
||||
set_property(TARGET "mad" PROPERTY FOLDER "External Libraries")
|
||||
set_property(TARGET "mad" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("mad")
|
||||
disable_project_warnings("mad")
|
||||
|
||||
if(ENDIAN_BIG)
|
||||
set(WORDS_BIGENDIAN 1)
|
||||
if(ENDIAN_BIG)
|
||||
set(WORDS_BIGENDIAN 1)
|
||||
endif()
|
||||
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Debug>:DEBUG>)
|
||||
sm_add_compile_definition("mad" HAVE_CONFIG_H)
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("mad" _CRT_SECURE_NO_WARNINGS)
|
||||
# TODO: Remove the need for this check since it's tied to 32-bit builds from
|
||||
# first glance.
|
||||
sm_add_compile_definition("mad" ASO_ZEROCHECK)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Debug>:FPM_DEFAULT>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Release>:FPM_INTEL>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:MinSizeRel>:FPM_INTEL>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:RelWithDebInfo>:FPM_INTEL>)
|
||||
# TODO: Provide a proper define for inline.
|
||||
sm_add_compile_definition("mad" inline=__inline)
|
||||
elseif(APPLE OR UNIX)
|
||||
sm_add_compile_definition("mad" FPM_64BIT=1)
|
||||
endif(MSVC)
|
||||
|
||||
target_include_directories("mad" PUBLIC "${MAD_DIR}")
|
||||
|
||||
configure_file("${SM_EXTERN_DIR}/config.mad.in.h" "${MAD_DIR}/config.h")
|
||||
endif()
|
||||
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Debug>:DEBUG>)
|
||||
sm_add_compile_definition("mad" HAVE_CONFIG_H)
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("mad" _CRT_SECURE_NO_WARNINGS)
|
||||
# TODO: Remove the need for this check since it's tied to 32-bit builds from first glance.
|
||||
sm_add_compile_definition("mad" ASO_ZEROCHECK)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Debug>:FPM_DEFAULT>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:Release>:FPM_INTEL>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:MinSizeRel>:FPM_INTEL>)
|
||||
sm_add_compile_definition("mad" $<$<CONFIG:RelWithDebInfo>:FPM_INTEL>)
|
||||
# TODO: Provide a proper define for inline.
|
||||
sm_add_compile_definition("mad" inline=__inline)
|
||||
elseif(APPLE)
|
||||
sm_add_compile_definition("mad" FPM_64BIT=1)
|
||||
endif(MSVC)
|
||||
|
||||
target_include_directories("mad" PUBLIC "${MAD_DIR}")
|
||||
|
||||
configure_file("${SM_EXTERN_DIR}/config.mad.in.h" "${MAD_DIR}/config.h")
|
||||
|
||||
Vendored
+2
-6
@@ -2,14 +2,10 @@ if(LINUX)
|
||||
if(WITH_MINIMAID)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-64bit/libmmmagic.a"
|
||||
"udev"
|
||||
)
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-64bit/libmmmagic.a" "udev")
|
||||
else()
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-32bit/libmmmagic.a"
|
||||
"udev"
|
||||
)
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-32bit/libmmmagic.a" "udev")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Vendored
+22
-25
@@ -1,25 +1,22 @@
|
||||
set(OGG_DIR "${SM_EXTERN_DIR}/newogg")
|
||||
|
||||
list(APPEND OGG_SRC
|
||||
"${OGG_DIR}/src/bitwise.c"
|
||||
"${OGG_DIR}/src/framing.c"
|
||||
)
|
||||
|
||||
list(APPEND OGG_HPP
|
||||
"${OGG_DIR}/include/ogg/config_types.h"
|
||||
"${OGG_DIR}/include/ogg/ogg.h"
|
||||
"${OGG_DIR}/include/ogg/os_types.h"
|
||||
)
|
||||
|
||||
source_group("Source Files" FILES ${OGG_SRC})
|
||||
source_group("Header Files" FILES ${OGG_HPP})
|
||||
|
||||
add_library("ogg" STATIC ${OGG_SRC} ${OGG_HPP} ${OGG_DAT})
|
||||
|
||||
set_property(TARGET "ogg" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("ogg")
|
||||
|
||||
target_include_directories("ogg" PUBLIC "${OGG_DIR}/include")
|
||||
|
||||
configure_file("${SM_EXTERN_DIR}/config.ogg.types.in.h" "${OGG_DIR}/include/ogg/config_types.h")
|
||||
set(OGG_DIR "${SM_EXTERN_DIR}/newogg")
|
||||
|
||||
list(APPEND OGG_SRC "${OGG_DIR}/src/bitwise.c" "${OGG_DIR}/src/framing.c")
|
||||
|
||||
list(APPEND OGG_HPP
|
||||
"${OGG_DIR}/include/ogg/config_types.h"
|
||||
"${OGG_DIR}/include/ogg/ogg.h"
|
||||
"${OGG_DIR}/include/ogg/os_types.h")
|
||||
|
||||
source_group("Source Files" FILES ${OGG_SRC})
|
||||
source_group("Header Files" FILES ${OGG_HPP})
|
||||
|
||||
add_library("ogg" STATIC ${OGG_SRC} ${OGG_HPP})
|
||||
|
||||
set_property(TARGET "ogg" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("ogg")
|
||||
|
||||
target_include_directories("ogg" PUBLIC "${OGG_DIR}/include")
|
||||
|
||||
configure_file("${SM_EXTERN_DIR}/config.ogg.types.in.h"
|
||||
"${OGG_DIR}/include/ogg/config_types.h")
|
||||
|
||||
Vendored
+11
-16
@@ -1,21 +1,16 @@
|
||||
set(PCRE_SRC
|
||||
"pcre/get.c"
|
||||
"pcre/maketables.c"
|
||||
"pcre/pcre.c"
|
||||
"pcre/study.c"
|
||||
)
|
||||
if(WITH_SYSTEM_PCRE)
|
||||
find_package(Pcre REQUIRED)
|
||||
else()
|
||||
set(PCRE_SRC "pcre/get.c" "pcre/maketables.c" "pcre/pcre.c" "pcre/study.c")
|
||||
|
||||
set(PCRE_HPP
|
||||
"pcre/internal.h"
|
||||
"pcre/pcre.h"
|
||||
)
|
||||
set(PCRE_HPP "pcre/internal.h" "pcre/pcre.h")
|
||||
|
||||
source_group("" FILES ${PCRE_SRC})
|
||||
source_group("" FILES ${PCRE_HPP})
|
||||
source_group("" FILES ${PCRE_SRC})
|
||||
source_group("" FILES ${PCRE_HPP})
|
||||
|
||||
add_library("pcre" ${PCRE_SRC} ${PCRE_HPP})
|
||||
add_library("pcre" ${PCRE_SRC} ${PCRE_HPP})
|
||||
|
||||
set_property(TARGET "pcre" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("pcre")
|
||||
set_property(TARGET "pcre" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("pcre")
|
||||
endif()
|
||||
|
||||
Vendored
+39
-37
@@ -1,44 +1,46 @@
|
||||
set(PNG_SRC
|
||||
"libpng/include/png.c"
|
||||
"libpng/include/pngerror.c"
|
||||
"libpng/include/pngget.c"
|
||||
"libpng/include/pngmem.c"
|
||||
"libpng/include/pngpread.c"
|
||||
"libpng/include/pngread.c"
|
||||
"libpng/include/pngrio.c"
|
||||
"libpng/include/pngrtran.c"
|
||||
"libpng/include/pngrutil.c"
|
||||
"libpng/include/pngset.c"
|
||||
"libpng/include/pngtest.c"
|
||||
"libpng/include/pngtrans.c"
|
||||
"libpng/include/pngwio.c"
|
||||
"libpng/include/pngwrite.c"
|
||||
"libpng/include/pngwtran.c"
|
||||
"libpng/include/pngwutil.c"
|
||||
)
|
||||
if(WITH_SYSTEM_PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
set(PNG_LIBRARIES ${PNG_LIBRARIES} PARENT_SCOPE)
|
||||
else()
|
||||
set(PNG_SRC
|
||||
"libpng/include/png.c"
|
||||
"libpng/include/pngerror.c"
|
||||
"libpng/include/pngget.c"
|
||||
"libpng/include/pngmem.c"
|
||||
"libpng/include/pngpread.c"
|
||||
"libpng/include/pngread.c"
|
||||
"libpng/include/pngrio.c"
|
||||
"libpng/include/pngrtran.c"
|
||||
"libpng/include/pngrutil.c"
|
||||
"libpng/include/pngset.c"
|
||||
"libpng/include/pngtest.c"
|
||||
"libpng/include/pngtrans.c"
|
||||
"libpng/include/pngwio.c"
|
||||
"libpng/include/pngwrite.c"
|
||||
"libpng/include/pngwtran.c"
|
||||
"libpng/include/pngwutil.c")
|
||||
|
||||
set(PNG_HPP
|
||||
"libpng/include/png.h"
|
||||
"libpng/include/pngconf.h"
|
||||
"libpng/include/pngdebug.h"
|
||||
"libpng/include/pnginfo.h"
|
||||
"libpng/include/pnglibconf.h"
|
||||
"libpng/include/pngpriv.h"
|
||||
"libpng/include/pngstruct.h"
|
||||
)
|
||||
set(PNG_HPP
|
||||
"libpng/include/png.h"
|
||||
"libpng/include/pngconf.h"
|
||||
"libpng/include/pngdebug.h"
|
||||
"libpng/include/pnginfo.h"
|
||||
"libpng/include/pnglibconf.h"
|
||||
"libpng/include/pngpriv.h"
|
||||
"libpng/include/pngstruct.h")
|
||||
|
||||
source_group("" FILES ${PNG_SRC})
|
||||
source_group("" FILES ${PNG_HPP})
|
||||
source_group("" FILES ${PNG_SRC})
|
||||
source_group("" FILES ${PNG_HPP})
|
||||
|
||||
add_library("png" STATIC ${PNG_SRC} ${PNG_HPP})
|
||||
add_library("png" STATIC ${PNG_SRC} ${PNG_HPP})
|
||||
|
||||
set_property(TARGET "png" PROPERTY FOLDER "External Libraries")
|
||||
set_property(TARGET "png" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("png")
|
||||
disable_project_warnings("png")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("png" _CRT_SECURE_NO_WARNINGS)
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("png" _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
target_include_directories("png" PUBLIC "zlib")
|
||||
endif()
|
||||
|
||||
target_include_directories("png" PUBLIC "zlib")
|
||||
|
||||
|
||||
Vendored
+273
-289
@@ -1,289 +1,273 @@
|
||||
set(TOMDIR "${SM_SRC_DIR}/libtomcrypt")
|
||||
|
||||
list(APPEND TOMCRYPT_MISC_CRYPT
|
||||
"${TOMDIR}/src/misc/crypt/crypt.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_argchk.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_cipher_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_cipher_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher_any.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher_id.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_any.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_id.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_oid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_prng.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_fsa.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_hash_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_hash_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_ltc_mp_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_prng_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_prng_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_prng.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_prng.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\misc\\\\crypt" FILES ${TOMCRYPT_MISC_CRYPT})
|
||||
|
||||
set(TOMCRYPT_CIPHERS_AES
|
||||
"${TOMDIR}/src/ciphers/aes/aes.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\ciphers\\\\aes" FILES ${TOMCRYPT_CIPHERS_AES})
|
||||
|
||||
set(TOMCRYPT_HASHES
|
||||
"${TOMDIR}/src/hashes/md5.c"
|
||||
"${TOMDIR}/src/hashes/sha1.c"
|
||||
"${TOMDIR}/src/hashes/helper/hash_memory.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\hashes" FILES ${TOMCRYPT_HASHES})
|
||||
|
||||
list(APPEND TOMCRYPT_MISC
|
||||
"${TOMDIR}/src/misc/burn_stack.c"
|
||||
"${TOMDIR}/src/misc/error_to_string.c"
|
||||
"${TOMDIR}/src/misc/zeromem.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\misc" FILES ${TOMCRYPT_MISC})
|
||||
|
||||
set(TOMCRYPT_MISC_BASE64
|
||||
"${TOMDIR}/src/misc/base64/base64_decode.c"
|
||||
"${TOMDIR}/src/misc/base64/base64_encode.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\misc\\\\base64" FILES ${TOMCRYPT_MISC_BASE64})
|
||||
|
||||
set(TOMCRYPT_MISC_PKCS5
|
||||
"${TOMDIR}/src/misc/pkcs5/pkcs_5_1.c"
|
||||
"${TOMDIR}/src/misc/pkcs5/pkcs_5_2.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\misc\\\\pkcs5" FILES ${TOMCRYPT_MISC_PKCS5})
|
||||
|
||||
set(TOMCRYPT_MATH
|
||||
"${TOMDIR}/src/math/ltm_desc.c"
|
||||
"${TOMDIR}/src/math/fp/ltc_ecc_fp_mulmod.c"
|
||||
"${TOMDIR}/src/math/multi.c"
|
||||
"${TOMDIR}/src/math/rand_prime.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\math" FILES ${TOMCRYPT_MATH})
|
||||
|
||||
list(APPEND TOMCRYPT_PRNGS
|
||||
"${TOMDIR}/src/prngs/fortuna.c"
|
||||
"${TOMDIR}/src/prngs/rc4.c"
|
||||
"${TOMDIR}/src/prngs/rng_get_bytes.c"
|
||||
"${TOMDIR}/src/prngs/rng_make_prng.c"
|
||||
"${TOMDIR}/src/prngs/sprng.c"
|
||||
"${TOMDIR}/src/prngs/yarrow.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\prngs" FILES ${TOMCRYPT_PRNGS})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CBC
|
||||
"${TOMDIR}/src/modes/cbc/cbc_decrypt.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_done.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_encrypt.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_getiv.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_setiv.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_start.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\modes\\\\cbc" FILES ${TOMCRYPT_MODES_CBC})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CFB
|
||||
"${TOMDIR}/src/modes/cfb/cfb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_done.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_getiv.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_setiv.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_start.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\modes\\\\cfb" FILES ${TOMCRYPT_MODES_CFB})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CTR
|
||||
"${TOMDIR}/src/modes/ctr/ctr_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_done.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_getiv.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_setiv.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_start.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_test.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\modes\\\\ctr" FILES ${TOMCRYPT_MODES_CTR})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_ECB
|
||||
"${TOMDIR}/src/modes/ecb/ecb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_done.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_start.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\modes\\\\ecb" FILES ${TOMCRYPT_MODES_ECB})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_OFB
|
||||
"${TOMDIR}/src/modes/ofb/ofb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_done.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_getiv.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_setiv.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_start.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\modes\\\\ofb" FILES ${TOMCRYPT_MODES_OFB})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_RSA
|
||||
"${TOMDIR}/src/pk/rsa/rsa_decrypt_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_encrypt_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_export.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_exptmod.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_free.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_import.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_make_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_sign_hash.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_verify_hash.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\pk\\\\rsa" FILES ${TOMCRYPT_PK_RSA})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_PKCS1
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_i2osp.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_mgf1.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_oaep_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_oaep_encode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_os2ip.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_pss_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_pss_encode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_v1_5_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_v1_5_encode.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\pk\\\\pkcs1" FILES ${TOMCRYPT_PK_PKCS1})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_DSA
|
||||
"${TOMDIR}/src/pk/dsa/dsa_decrypt_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_encrypt_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_export.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_free.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_import.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_make_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_shared_secret.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_sign_hash.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_verify_hash.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_verify_key.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\pk\\\\dsa" FILES ${TOMCRYPT_PK_DSA})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_DER
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_decode_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_encode_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_length_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_decode_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_encode_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_length_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/choice/der_decode_choice.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_decode_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_encode_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_length_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_decode_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_encode_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_length_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_decode_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_encode_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_length_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_decode_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_encode_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_length_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_decode_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_encode_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_length_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_ex.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_multi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_encode_sequence_ex.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_encode_sequence_multi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_length_sequence.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_sequence_free.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/set/der_encode_set.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/set/der_encode_setof.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_decode_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_encode_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_length_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_decode_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_encode_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_length_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_decode_utf8_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_encode_utf8_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_length_utf8_string.c"
|
||||
)
|
||||
|
||||
source_group("src\\\\pk\\\\ans1" FILES ${TOMCRYPT_PK_DER})
|
||||
|
||||
list(APPEND TOMCRYPT_SRC
|
||||
${TOMCRYPT_CIPHERS_AES}
|
||||
${TOMCRYPT_HASHES}
|
||||
${TOMCRYPT_MISC}
|
||||
${TOMCRYPT_MISC_BASE64}
|
||||
${TOMCRYPT_MISC_CRYPT}
|
||||
${TOMCRYPT_MISC_PKCS5}
|
||||
${TOMCRYPT_MATH}
|
||||
${TOMCRYPT_MODES_CBC}
|
||||
${TOMCRYPT_MODES_CFB}
|
||||
${TOMCRYPT_MODES_CTR}
|
||||
${TOMCRYPT_MODES_ECB}
|
||||
${TOMCRYPT_MODES_OFB}
|
||||
${TOMCRYPT_PRNGS}
|
||||
${TOMCRYPT_PK_RSA}
|
||||
${TOMCRYPT_PK_PKCS1}
|
||||
${TOMCRYPT_PK_DSA}
|
||||
${TOMCRYPT_PK_DER}
|
||||
)
|
||||
|
||||
list(APPEND TOMCRYPT_HPP
|
||||
"${TOMDIR}/src/headers/tomcrypt.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_argchk.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_cfg.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_cipher.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_custom.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_hash.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_mac.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_macros.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_math.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_misc.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_pk.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_pkcs.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_prng.h"
|
||||
)
|
||||
|
||||
source_group("headers" FILES ${TOMCRYPT_HPP})
|
||||
|
||||
add_library("tomcrypt" STATIC ${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")
|
||||
sm_append_simple_target_property("tomcrypt" XCODE_ATTRIBUTE_GCC_PREPROCESSOR_DEFINITIONS[variant=Debug]
|
||||
"'CMAKE_INTDIR=\"Debug\"' LTC_NO_ROLC DEBUG=1")
|
||||
elseif (MSVC)
|
||||
sm_add_compile_definition("tomcrypt" _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
disable_project_warnings("tomcrypt")
|
||||
|
||||
target_include_directories("tomcrypt" PUBLIC "${TOMDIR}/src/headers")
|
||||
if(WITH_SYSTEM_TOMCRYPT)
|
||||
find_library(TOMCRYPT_LIBRARY tomcrypt)
|
||||
else()
|
||||
set(TOMDIR "${SM_SRC_DIR}/libtomcrypt")
|
||||
|
||||
list(APPEND TOMCRYPT_MISC_CRYPT
|
||||
"${TOMDIR}/src/misc/crypt/crypt.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_argchk.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_cipher_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_cipher_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher_any.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_cipher_id.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_any.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_id.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_hash_oid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_find_prng.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_fsa.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_hash_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_hash_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_ltc_mp_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_prng_descriptor.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_prng_is_valid.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_register_prng.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_cipher.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_hash.c"
|
||||
"${TOMDIR}/src/misc/crypt/crypt_unregister_prng.c")
|
||||
|
||||
source_group("src\\\\misc\\\\crypt" FILES ${TOMCRYPT_MISC_CRYPT})
|
||||
|
||||
set(TOMCRYPT_CIPHERS_AES "${TOMDIR}/src/ciphers/aes/aes.c")
|
||||
|
||||
source_group("src\\\\ciphers\\\\aes" FILES ${TOMCRYPT_CIPHERS_AES})
|
||||
|
||||
set(TOMCRYPT_HASHES
|
||||
"${TOMDIR}/src/hashes/md5.c"
|
||||
"${TOMDIR}/src/hashes/sha1.c"
|
||||
"${TOMDIR}/src/hashes/helper/hash_memory.c")
|
||||
|
||||
source_group("src\\\\hashes" FILES ${TOMCRYPT_HASHES})
|
||||
|
||||
list(APPEND TOMCRYPT_MISC
|
||||
"${TOMDIR}/src/misc/burn_stack.c"
|
||||
"${TOMDIR}/src/misc/error_to_string.c"
|
||||
"${TOMDIR}/src/misc/zeromem.c")
|
||||
|
||||
source_group("src\\\\misc" FILES ${TOMCRYPT_MISC})
|
||||
|
||||
set(TOMCRYPT_MISC_BASE64 "${TOMDIR}/src/misc/base64/base64_decode.c"
|
||||
"${TOMDIR}/src/misc/base64/base64_encode.c")
|
||||
|
||||
source_group("src\\\\misc\\\\base64" FILES ${TOMCRYPT_MISC_BASE64})
|
||||
|
||||
set(TOMCRYPT_MISC_PKCS5 "${TOMDIR}/src/misc/pkcs5/pkcs_5_1.c"
|
||||
"${TOMDIR}/src/misc/pkcs5/pkcs_5_2.c")
|
||||
|
||||
source_group("src\\\\misc\\\\pkcs5" FILES ${TOMCRYPT_MISC_PKCS5})
|
||||
|
||||
set(TOMCRYPT_MATH
|
||||
"${TOMDIR}/src/math/ltm_desc.c"
|
||||
"${TOMDIR}/src/math/fp/ltc_ecc_fp_mulmod.c"
|
||||
"${TOMDIR}/src/math/multi.c"
|
||||
"${TOMDIR}/src/math/rand_prime.c")
|
||||
|
||||
source_group("src\\\\math" FILES ${TOMCRYPT_MATH})
|
||||
|
||||
list(APPEND TOMCRYPT_PRNGS
|
||||
"${TOMDIR}/src/prngs/fortuna.c"
|
||||
"${TOMDIR}/src/prngs/rc4.c"
|
||||
"${TOMDIR}/src/prngs/rng_get_bytes.c"
|
||||
"${TOMDIR}/src/prngs/rng_make_prng.c"
|
||||
"${TOMDIR}/src/prngs/sprng.c"
|
||||
"${TOMDIR}/src/prngs/yarrow.c")
|
||||
|
||||
source_group("src\\\\prngs" FILES ${TOMCRYPT_PRNGS})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CBC
|
||||
"${TOMDIR}/src/modes/cbc/cbc_decrypt.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_done.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_encrypt.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_getiv.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_setiv.c"
|
||||
"${TOMDIR}/src/modes/cbc/cbc_start.c")
|
||||
|
||||
source_group("src\\\\modes\\\\cbc" FILES ${TOMCRYPT_MODES_CBC})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CFB
|
||||
"${TOMDIR}/src/modes/cfb/cfb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_done.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_getiv.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_setiv.c"
|
||||
"${TOMDIR}/src/modes/cfb/cfb_start.c")
|
||||
|
||||
source_group("src\\\\modes\\\\cfb" FILES ${TOMCRYPT_MODES_CFB})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_CTR
|
||||
"${TOMDIR}/src/modes/ctr/ctr_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_done.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_getiv.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_setiv.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_start.c"
|
||||
"${TOMDIR}/src/modes/ctr/ctr_test.c")
|
||||
|
||||
source_group("src\\\\modes\\\\ctr" FILES ${TOMCRYPT_MODES_CTR})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_ECB
|
||||
"${TOMDIR}/src/modes/ecb/ecb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_done.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ecb/ecb_start.c")
|
||||
|
||||
source_group("src\\\\modes\\\\ecb" FILES ${TOMCRYPT_MODES_ECB})
|
||||
|
||||
list(APPEND TOMCRYPT_MODES_OFB
|
||||
"${TOMDIR}/src/modes/ofb/ofb_decrypt.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_done.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_encrypt.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_getiv.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_setiv.c"
|
||||
"${TOMDIR}/src/modes/ofb/ofb_start.c")
|
||||
|
||||
source_group("src\\\\modes\\\\ofb" FILES ${TOMCRYPT_MODES_OFB})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_RSA
|
||||
"${TOMDIR}/src/pk/rsa/rsa_decrypt_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_encrypt_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_export.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_exptmod.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_free.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_import.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_make_key.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_sign_hash.c"
|
||||
"${TOMDIR}/src/pk/rsa/rsa_verify_hash.c")
|
||||
|
||||
source_group("src\\\\pk\\\\rsa" FILES ${TOMCRYPT_PK_RSA})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_PKCS1
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_i2osp.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_mgf1.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_oaep_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_oaep_encode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_os2ip.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_pss_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_pss_encode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_v1_5_decode.c"
|
||||
"${TOMDIR}/src/pk/pkcs1/pkcs_1_v1_5_encode.c")
|
||||
|
||||
source_group("src\\\\pk\\\\pkcs1" FILES ${TOMCRYPT_PK_PKCS1})
|
||||
|
||||
list(APPEND TOMCRYPT_PK_DSA
|
||||
"${TOMDIR}/src/pk/dsa/dsa_decrypt_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_encrypt_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_export.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_free.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_import.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_make_key.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_shared_secret.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_sign_hash.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_verify_hash.c"
|
||||
"${TOMDIR}/src/pk/dsa/dsa_verify_key.c")
|
||||
|
||||
source_group("src\\\\pk\\\\dsa" FILES ${TOMCRYPT_PK_DSA})
|
||||
|
||||
list(
|
||||
APPEND
|
||||
TOMCRYPT_PK_DER
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_decode_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_encode_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/bit/der_length_bit_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_decode_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_encode_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/boolean/der_length_boolean.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/choice/der_decode_choice.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_decode_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_encode_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/ia5/der_length_ia5_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_decode_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_encode_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/integer/der_length_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_decode_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_encode_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/object_identifier/der_length_object_identifier.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_decode_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_encode_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/octet/der_length_octet_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_decode_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_encode_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/printable_string/der_length_printable_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_ex.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_decode_sequence_multi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_encode_sequence_ex.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_encode_sequence_multi.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_length_sequence.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/sequence/der_sequence_free.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/set/der_encode_set.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/set/der_encode_setof.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_decode_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_encode_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/short_integer/der_length_short_integer.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_decode_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_encode_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utctime/der_length_utctime.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_decode_utf8_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_encode_utf8_string.c"
|
||||
"${TOMDIR}/src/pk/asn1/der/utf8/der_length_utf8_string.c")
|
||||
|
||||
source_group("src\\\\pk\\\\ans1" FILES ${TOMCRYPT_PK_DER})
|
||||
|
||||
list(APPEND TOMCRYPT_SRC
|
||||
${TOMCRYPT_CIPHERS_AES}
|
||||
${TOMCRYPT_HASHES}
|
||||
${TOMCRYPT_MISC}
|
||||
${TOMCRYPT_MISC_BASE64}
|
||||
${TOMCRYPT_MISC_CRYPT}
|
||||
${TOMCRYPT_MISC_PKCS5}
|
||||
${TOMCRYPT_MATH}
|
||||
${TOMCRYPT_MODES_CBC}
|
||||
${TOMCRYPT_MODES_CFB}
|
||||
${TOMCRYPT_MODES_CTR}
|
||||
${TOMCRYPT_MODES_ECB}
|
||||
${TOMCRYPT_MODES_OFB}
|
||||
${TOMCRYPT_PRNGS}
|
||||
${TOMCRYPT_PK_RSA}
|
||||
${TOMCRYPT_PK_PKCS1}
|
||||
${TOMCRYPT_PK_DSA}
|
||||
${TOMCRYPT_PK_DER})
|
||||
|
||||
list(APPEND TOMCRYPT_HPP
|
||||
"${TOMDIR}/src/headers/tomcrypt.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_argchk.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_cfg.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_cipher.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_custom.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_hash.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_mac.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_macros.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_math.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_misc.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_pk.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_pkcs.h"
|
||||
"${TOMDIR}/src/headers/tomcrypt_prng.h")
|
||||
|
||||
source_group("headers" FILES ${TOMCRYPT_HPP})
|
||||
|
||||
add_library("tomcrypt" STATIC ${TOMCRYPT_SRC} ${TOMCRYPT_HPP})
|
||||
|
||||
set_property(TARGET "tomcrypt" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
if(WITH_PORTABLE_TOMCRYPT)
|
||||
sm_add_compile_definition("tomcrypt" LTC_NO_ASM)
|
||||
endif()
|
||||
if(WITH_NO_ROLC_TOMCRYPT)
|
||||
sm_add_compile_definition("tomcrypt" LTC_NO_ROLC)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
sm_append_simple_target_property("tomcrypt"
|
||||
XCODE_ATTRIBUTE_GCC_NO_COMMON_BLOCKS "YES")
|
||||
endif()
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("tomcrypt" _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
disable_project_warnings("tomcrypt")
|
||||
|
||||
target_include_directories("tomcrypt" PUBLIC "${TOMDIR}/src/headers")
|
||||
endif()
|
||||
|
||||
Vendored
+138
-134
@@ -1,141 +1,145 @@
|
||||
set(TOMDIR "${SM_SRC_DIR}/libtommath")
|
||||
if(WITH_SYSTEM_TOMMATH)
|
||||
find_library(TOMMATH_LIBRARY tommath)
|
||||
if(TOMMATH_LIBRARY MATCHES "TOMMATH_LIBRARY-NOTFOUND")
|
||||
message(FATAL_ERROR "Need tommath.")
|
||||
endif()
|
||||
else()
|
||||
set(TOMDIR "${SM_SRC_DIR}/libtommath")
|
||||
|
||||
list(APPEND TOMMATH_SRC
|
||||
"${TOMDIR}/bn_error.c"
|
||||
"${TOMDIR}/bn_fast_mp_invmod.c"
|
||||
"${TOMDIR}/bn_fast_mp_montgomery_reduce.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_mul_digs.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_mul_high_digs.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_sqr.c"
|
||||
"${TOMDIR}/bn_mp_2expt.c"
|
||||
"${TOMDIR}/bn_mp_abs.c"
|
||||
"${TOMDIR}/bn_mp_add.c"
|
||||
"${TOMDIR}/bn_mp_addmod.c"
|
||||
"${TOMDIR}/bn_mp_add_d.c"
|
||||
"${TOMDIR}/bn_mp_and.c"
|
||||
"${TOMDIR}/bn_mp_clamp.c"
|
||||
"${TOMDIR}/bn_mp_clear.c"
|
||||
"${TOMDIR}/bn_mp_clear_multi.c"
|
||||
"${TOMDIR}/bn_mp_cmp.c"
|
||||
"${TOMDIR}/bn_mp_cmp_d.c"
|
||||
"${TOMDIR}/bn_mp_cmp_mag.c"
|
||||
"${TOMDIR}/bn_mp_cnt_lsb.c"
|
||||
"${TOMDIR}/bn_mp_copy.c"
|
||||
"${TOMDIR}/bn_mp_count_bits.c"
|
||||
"${TOMDIR}/bn_mp_div.c"
|
||||
"${TOMDIR}/bn_mp_div_2.c"
|
||||
"${TOMDIR}/bn_mp_div_2d.c"
|
||||
"${TOMDIR}/bn_mp_div_3.c"
|
||||
"${TOMDIR}/bn_mp_div_d.c"
|
||||
"${TOMDIR}/bn_mp_dr_is_modulus.c"
|
||||
"${TOMDIR}/bn_mp_dr_reduce.c"
|
||||
"${TOMDIR}/bn_mp_dr_setup.c"
|
||||
"${TOMDIR}/bn_mp_exch.c"
|
||||
"${TOMDIR}/bn_mp_expt_d.c"
|
||||
"${TOMDIR}/bn_mp_exptmod.c"
|
||||
"${TOMDIR}/bn_mp_exptmod_fast.c"
|
||||
"${TOMDIR}/bn_mp_exteuclid.c"
|
||||
"${TOMDIR}/bn_mp_fread.c"
|
||||
"${TOMDIR}/bn_mp_fwrite.c"
|
||||
"${TOMDIR}/bn_mp_gcd.c"
|
||||
"${TOMDIR}/bn_mp_get_int.c"
|
||||
"${TOMDIR}/bn_mp_grow.c"
|
||||
"${TOMDIR}/bn_mp_init.c"
|
||||
"${TOMDIR}/bn_mp_init_copy.c"
|
||||
"${TOMDIR}/bn_mp_init_multi.c"
|
||||
"${TOMDIR}/bn_mp_init_set.c"
|
||||
"${TOMDIR}/bn_mp_init_set_int.c"
|
||||
"${TOMDIR}/bn_mp_init_size.c"
|
||||
"${TOMDIR}/bn_mp_invmod.c"
|
||||
"${TOMDIR}/bn_mp_invmod_slow.c"
|
||||
"${TOMDIR}/bn_mp_is_square.c"
|
||||
"${TOMDIR}/bn_mp_jacobi.c"
|
||||
"${TOMDIR}/bn_mp_karatsuba_mul.c"
|
||||
"${TOMDIR}/bn_mp_karatsuba_sqr.c"
|
||||
"${TOMDIR}/bn_mp_lcm.c"
|
||||
"${TOMDIR}/bn_mp_lshd.c"
|
||||
"${TOMDIR}/bn_mp_mod.c"
|
||||
"${TOMDIR}/bn_mp_mod_2d.c"
|
||||
"${TOMDIR}/bn_mp_mod_d.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_calc_normalization.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_reduce.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_setup.c"
|
||||
"${TOMDIR}/bn_mp_mul.c"
|
||||
"${TOMDIR}/bn_mp_mul_2.c"
|
||||
"${TOMDIR}/bn_mp_mul_2d.c"
|
||||
"${TOMDIR}/bn_mp_mul_d.c"
|
||||
"${TOMDIR}/bn_mp_mulmod.c"
|
||||
"${TOMDIR}/bn_mp_n_root.c"
|
||||
"${TOMDIR}/bn_mp_neg.c"
|
||||
"${TOMDIR}/bn_mp_or.c"
|
||||
"${TOMDIR}/bn_mp_prime_fermat.c"
|
||||
"${TOMDIR}/bn_mp_prime_is_divisible.c"
|
||||
"${TOMDIR}/bn_mp_prime_is_prime.c"
|
||||
"${TOMDIR}/bn_mp_prime_miller_rabin.c"
|
||||
"${TOMDIR}/bn_mp_prime_next_prime.c"
|
||||
"${TOMDIR}/bn_mp_prime_rabin_miller_trials.c"
|
||||
"${TOMDIR}/bn_mp_prime_random_ex.c"
|
||||
"${TOMDIR}/bn_mp_radix_size.c"
|
||||
"${TOMDIR}/bn_mp_radix_smap.c"
|
||||
"${TOMDIR}/bn_mp_rand.c"
|
||||
"${TOMDIR}/bn_mp_read_radix.c"
|
||||
"${TOMDIR}/bn_mp_read_signed_bin.c"
|
||||
"${TOMDIR}/bn_mp_read_unsigned_bin.c"
|
||||
"${TOMDIR}/bn_mp_reduce.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_setup.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_setup_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_is_2k.c"
|
||||
"${TOMDIR}/bn_mp_reduce_is_2k_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_setup.c"
|
||||
"${TOMDIR}/bn_mp_rshd.c"
|
||||
"${TOMDIR}/bn_mp_set.c"
|
||||
"${TOMDIR}/bn_mp_set_int.c"
|
||||
"${TOMDIR}/bn_mp_shrink.c"
|
||||
"${TOMDIR}/bn_mp_signed_bin_size.c"
|
||||
"${TOMDIR}/bn_mp_sqr.c"
|
||||
"${TOMDIR}/bn_mp_sqrmod.c"
|
||||
"${TOMDIR}/bn_mp_sqrt.c"
|
||||
"${TOMDIR}/bn_mp_sub.c"
|
||||
"${TOMDIR}/bn_mp_sub_d.c"
|
||||
"${TOMDIR}/bn_mp_submod.c"
|
||||
"${TOMDIR}/bn_mp_to_signed_bin.c"
|
||||
"${TOMDIR}/bn_mp_to_signed_bin_n.c"
|
||||
"${TOMDIR}/bn_mp_to_unsigned_bin.c"
|
||||
"${TOMDIR}/bn_mp_to_unsigned_bin_n.c"
|
||||
"${TOMDIR}/bn_mp_toom_mul.c"
|
||||
"${TOMDIR}/bn_mp_toom_sqr.c"
|
||||
"${TOMDIR}/bn_mp_toradix.c"
|
||||
"${TOMDIR}/bn_mp_toradix_n.c"
|
||||
"${TOMDIR}/bn_mp_unsigned_bin_size.c"
|
||||
"${TOMDIR}/bn_mp_xor.c"
|
||||
"${TOMDIR}/bn_mp_zero.c"
|
||||
"${TOMDIR}/bn_prime_tab.c"
|
||||
"${TOMDIR}/bn_reverse.c"
|
||||
"${TOMDIR}/bn_s_mp_add.c"
|
||||
"${TOMDIR}/bn_s_mp_exptmod.c"
|
||||
"${TOMDIR}/bn_s_mp_mul_digs.c"
|
||||
"${TOMDIR}/bn_s_mp_mul_high_digs.c"
|
||||
"${TOMDIR}/bn_s_mp_sqr.c"
|
||||
"${TOMDIR}/bn_s_mp_sub.c"
|
||||
"${TOMDIR}/bncore.c"
|
||||
)
|
||||
list(APPEND TOMMATH_SRC
|
||||
"${TOMDIR}/bn_error.c"
|
||||
"${TOMDIR}/bn_fast_mp_invmod.c"
|
||||
"${TOMDIR}/bn_fast_mp_montgomery_reduce.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_mul_digs.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_mul_high_digs.c"
|
||||
"${TOMDIR}/bn_fast_s_mp_sqr.c"
|
||||
"${TOMDIR}/bn_mp_2expt.c"
|
||||
"${TOMDIR}/bn_mp_abs.c"
|
||||
"${TOMDIR}/bn_mp_add.c"
|
||||
"${TOMDIR}/bn_mp_addmod.c"
|
||||
"${TOMDIR}/bn_mp_add_d.c"
|
||||
"${TOMDIR}/bn_mp_and.c"
|
||||
"${TOMDIR}/bn_mp_clamp.c"
|
||||
"${TOMDIR}/bn_mp_clear.c"
|
||||
"${TOMDIR}/bn_mp_clear_multi.c"
|
||||
"${TOMDIR}/bn_mp_cmp.c"
|
||||
"${TOMDIR}/bn_mp_cmp_d.c"
|
||||
"${TOMDIR}/bn_mp_cmp_mag.c"
|
||||
"${TOMDIR}/bn_mp_cnt_lsb.c"
|
||||
"${TOMDIR}/bn_mp_copy.c"
|
||||
"${TOMDIR}/bn_mp_count_bits.c"
|
||||
"${TOMDIR}/bn_mp_div.c"
|
||||
"${TOMDIR}/bn_mp_div_2.c"
|
||||
"${TOMDIR}/bn_mp_div_2d.c"
|
||||
"${TOMDIR}/bn_mp_div_3.c"
|
||||
"${TOMDIR}/bn_mp_div_d.c"
|
||||
"${TOMDIR}/bn_mp_dr_is_modulus.c"
|
||||
"${TOMDIR}/bn_mp_dr_reduce.c"
|
||||
"${TOMDIR}/bn_mp_dr_setup.c"
|
||||
"${TOMDIR}/bn_mp_exch.c"
|
||||
"${TOMDIR}/bn_mp_expt_d.c"
|
||||
"${TOMDIR}/bn_mp_exptmod.c"
|
||||
"${TOMDIR}/bn_mp_exptmod_fast.c"
|
||||
"${TOMDIR}/bn_mp_exteuclid.c"
|
||||
"${TOMDIR}/bn_mp_fread.c"
|
||||
"${TOMDIR}/bn_mp_fwrite.c"
|
||||
"${TOMDIR}/bn_mp_gcd.c"
|
||||
"${TOMDIR}/bn_mp_get_int.c"
|
||||
"${TOMDIR}/bn_mp_grow.c"
|
||||
"${TOMDIR}/bn_mp_init.c"
|
||||
"${TOMDIR}/bn_mp_init_copy.c"
|
||||
"${TOMDIR}/bn_mp_init_multi.c"
|
||||
"${TOMDIR}/bn_mp_init_set.c"
|
||||
"${TOMDIR}/bn_mp_init_set_int.c"
|
||||
"${TOMDIR}/bn_mp_init_size.c"
|
||||
"${TOMDIR}/bn_mp_invmod.c"
|
||||
"${TOMDIR}/bn_mp_invmod_slow.c"
|
||||
"${TOMDIR}/bn_mp_is_square.c"
|
||||
"${TOMDIR}/bn_mp_jacobi.c"
|
||||
"${TOMDIR}/bn_mp_karatsuba_mul.c"
|
||||
"${TOMDIR}/bn_mp_karatsuba_sqr.c"
|
||||
"${TOMDIR}/bn_mp_lcm.c"
|
||||
"${TOMDIR}/bn_mp_lshd.c"
|
||||
"${TOMDIR}/bn_mp_mod.c"
|
||||
"${TOMDIR}/bn_mp_mod_2d.c"
|
||||
"${TOMDIR}/bn_mp_mod_d.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_calc_normalization.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_reduce.c"
|
||||
"${TOMDIR}/bn_mp_montgomery_setup.c"
|
||||
"${TOMDIR}/bn_mp_mul.c"
|
||||
"${TOMDIR}/bn_mp_mul_2.c"
|
||||
"${TOMDIR}/bn_mp_mul_2d.c"
|
||||
"${TOMDIR}/bn_mp_mul_d.c"
|
||||
"${TOMDIR}/bn_mp_mulmod.c"
|
||||
"${TOMDIR}/bn_mp_n_root.c"
|
||||
"${TOMDIR}/bn_mp_neg.c"
|
||||
"${TOMDIR}/bn_mp_or.c"
|
||||
"${TOMDIR}/bn_mp_prime_fermat.c"
|
||||
"${TOMDIR}/bn_mp_prime_is_divisible.c"
|
||||
"${TOMDIR}/bn_mp_prime_is_prime.c"
|
||||
"${TOMDIR}/bn_mp_prime_miller_rabin.c"
|
||||
"${TOMDIR}/bn_mp_prime_next_prime.c"
|
||||
"${TOMDIR}/bn_mp_prime_rabin_miller_trials.c"
|
||||
"${TOMDIR}/bn_mp_prime_random_ex.c"
|
||||
"${TOMDIR}/bn_mp_radix_size.c"
|
||||
"${TOMDIR}/bn_mp_radix_smap.c"
|
||||
"${TOMDIR}/bn_mp_rand.c"
|
||||
"${TOMDIR}/bn_mp_read_radix.c"
|
||||
"${TOMDIR}/bn_mp_read_signed_bin.c"
|
||||
"${TOMDIR}/bn_mp_read_unsigned_bin.c"
|
||||
"${TOMDIR}/bn_mp_reduce.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_setup.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_setup_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_2k_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_is_2k.c"
|
||||
"${TOMDIR}/bn_mp_reduce_is_2k_l.c"
|
||||
"${TOMDIR}/bn_mp_reduce_setup.c"
|
||||
"${TOMDIR}/bn_mp_rshd.c"
|
||||
"${TOMDIR}/bn_mp_set.c"
|
||||
"${TOMDIR}/bn_mp_set_int.c"
|
||||
"${TOMDIR}/bn_mp_shrink.c"
|
||||
"${TOMDIR}/bn_mp_signed_bin_size.c"
|
||||
"${TOMDIR}/bn_mp_sqr.c"
|
||||
"${TOMDIR}/bn_mp_sqrmod.c"
|
||||
"${TOMDIR}/bn_mp_sqrt.c"
|
||||
"${TOMDIR}/bn_mp_sub.c"
|
||||
"${TOMDIR}/bn_mp_sub_d.c"
|
||||
"${TOMDIR}/bn_mp_submod.c"
|
||||
"${TOMDIR}/bn_mp_to_signed_bin.c"
|
||||
"${TOMDIR}/bn_mp_to_signed_bin_n.c"
|
||||
"${TOMDIR}/bn_mp_to_unsigned_bin.c"
|
||||
"${TOMDIR}/bn_mp_to_unsigned_bin_n.c"
|
||||
"${TOMDIR}/bn_mp_toom_mul.c"
|
||||
"${TOMDIR}/bn_mp_toom_sqr.c"
|
||||
"${TOMDIR}/bn_mp_toradix.c"
|
||||
"${TOMDIR}/bn_mp_toradix_n.c"
|
||||
"${TOMDIR}/bn_mp_unsigned_bin_size.c"
|
||||
"${TOMDIR}/bn_mp_xor.c"
|
||||
"${TOMDIR}/bn_mp_zero.c"
|
||||
"${TOMDIR}/bn_prime_tab.c"
|
||||
"${TOMDIR}/bn_reverse.c"
|
||||
"${TOMDIR}/bn_s_mp_add.c"
|
||||
"${TOMDIR}/bn_s_mp_exptmod.c"
|
||||
"${TOMDIR}/bn_s_mp_mul_digs.c"
|
||||
"${TOMDIR}/bn_s_mp_mul_high_digs.c"
|
||||
"${TOMDIR}/bn_s_mp_sqr.c"
|
||||
"${TOMDIR}/bn_s_mp_sub.c"
|
||||
"${TOMDIR}/bncore.c")
|
||||
|
||||
list(APPEND TOMMATH_HPP
|
||||
"${TOMDIR}/tommath.h"
|
||||
"${TOMDIR}/tommath_class.h"
|
||||
"${TOMDIR}/tommath_superclass.h"
|
||||
)
|
||||
list(APPEND TOMMATH_HPP
|
||||
"${TOMDIR}/tommath.h"
|
||||
"${TOMDIR}/tommath_class.h"
|
||||
"${TOMDIR}/tommath_superclass.h")
|
||||
|
||||
source_group("" FILES ${TOMMATH_SRC})
|
||||
source_group("" FILES ${TOMMATH_HPP})
|
||||
source_group("" FILES ${TOMMATH_SRC})
|
||||
source_group("" FILES ${TOMMATH_HPP})
|
||||
|
||||
add_library("tommath" STATIC ${TOMMATH_SRC} ${TOMMATH_HPP})
|
||||
add_library("tommath" STATIC ${TOMMATH_SRC} ${TOMMATH_HPP})
|
||||
|
||||
set_property(TARGET "tommath" PROPERTY FOLDER "External Libraries")
|
||||
set_property(TARGET "tommath" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("tommath")
|
||||
|
||||
target_include_directories("tommath" PUBLIC ${TOMDIR})
|
||||
disable_project_warnings("tommath")
|
||||
|
||||
target_include_directories("tommath" PUBLIC ${TOMDIR})
|
||||
endif()
|
||||
|
||||
Vendored
+64
-69
@@ -1,70 +1,68 @@
|
||||
set(VORBIS_DIR "${SM_EXTERN_DIR}/newvorbis")
|
||||
|
||||
list(APPEND VORBIS_SRC
|
||||
"${VORBIS_DIR}/lib/analysis.c"
|
||||
"${VORBIS_DIR}/lib/bitrate.c"
|
||||
"${VORBIS_DIR}/lib/block.c"
|
||||
"${VORBIS_DIR}/lib/codebook.c"
|
||||
"${VORBIS_DIR}/lib/envelope.c"
|
||||
"${VORBIS_DIR}/lib/floor0.c"
|
||||
"${VORBIS_DIR}/lib/floor1.c"
|
||||
"${VORBIS_DIR}/lib/info.c"
|
||||
"${VORBIS_DIR}/lib/lookup.c"
|
||||
"${VORBIS_DIR}/lib/lpc.c"
|
||||
"${VORBIS_DIR}/lib/lsp.c"
|
||||
"${VORBIS_DIR}/lib/mapping0.c"
|
||||
"${VORBIS_DIR}/lib/mdct.c"
|
||||
"${VORBIS_DIR}/lib/psy.c"
|
||||
"${VORBIS_DIR}/lib/registry.c"
|
||||
"${VORBIS_DIR}/lib/res0.c"
|
||||
"${VORBIS_DIR}/lib/sharedbook.c"
|
||||
"${VORBIS_DIR}/lib/smallft.c"
|
||||
"${VORBIS_DIR}/lib/synthesis.c"
|
||||
"${VORBIS_DIR}/lib/vorbisenc.c"
|
||||
"${VORBIS_DIR}/lib/window.c"
|
||||
)
|
||||
"${VORBIS_DIR}/lib/analysis.c"
|
||||
"${VORBIS_DIR}/lib/bitrate.c"
|
||||
"${VORBIS_DIR}/lib/block.c"
|
||||
"${VORBIS_DIR}/lib/codebook.c"
|
||||
"${VORBIS_DIR}/lib/envelope.c"
|
||||
"${VORBIS_DIR}/lib/floor0.c"
|
||||
"${VORBIS_DIR}/lib/floor1.c"
|
||||
"${VORBIS_DIR}/lib/info.c"
|
||||
"${VORBIS_DIR}/lib/lookup.c"
|
||||
"${VORBIS_DIR}/lib/lpc.c"
|
||||
"${VORBIS_DIR}/lib/lsp.c"
|
||||
"${VORBIS_DIR}/lib/mapping0.c"
|
||||
"${VORBIS_DIR}/lib/mdct.c"
|
||||
"${VORBIS_DIR}/lib/psy.c"
|
||||
"${VORBIS_DIR}/lib/registry.c"
|
||||
"${VORBIS_DIR}/lib/res0.c"
|
||||
"${VORBIS_DIR}/lib/sharedbook.c"
|
||||
"${VORBIS_DIR}/lib/smallft.c"
|
||||
"${VORBIS_DIR}/lib/synthesis.c"
|
||||
"${VORBIS_DIR}/lib/vorbisenc.c"
|
||||
"${VORBIS_DIR}/lib/window.c")
|
||||
|
||||
list(APPEND VORBIS_HPP
|
||||
"${VORBIS_DIR}/lib/backends.h"
|
||||
"${VORBIS_DIR}/lib/bitrate.h"
|
||||
"${VORBIS_DIR}/lib/codebook.h"
|
||||
"${VORBIS_DIR}/include/vorbis/codec.h"
|
||||
"${VORBIS_DIR}/lib/codec_internal.h"
|
||||
"${VORBIS_DIR}/lib/envelope.h"
|
||||
"${VORBIS_DIR}/lib/modes/floor_all.h"
|
||||
"${VORBIS_DIR}/lib/books/floor/floor_books.h"
|
||||
"${VORBIS_DIR}/lib/highlevel.h"
|
||||
"${VORBIS_DIR}/lib/lookup.h"
|
||||
"${VORBIS_DIR}/lib/lookup_data.h"
|
||||
"${VORBIS_DIR}/lib/lpc.h"
|
||||
"${VORBIS_DIR}/lib/lsp.h"
|
||||
"${VORBIS_DIR}/lib/masking.h"
|
||||
"${VORBIS_DIR}/lib/mdct.h"
|
||||
"${VORBIS_DIR}/lib/misc.h"
|
||||
"${VORBIS_DIR}/lib/os.h"
|
||||
"${VORBIS_DIR}/lib/psy.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_11.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_8.h"
|
||||
"${VORBIS_DIR}/lib/registry.h"
|
||||
"${VORBIS_DIR}/lib/books/coupled/res_books_stereo.h"
|
||||
"${VORBIS_DIR}/lib/books/uncoupled/res_books_uncoupled.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_44u.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_8.h"
|
||||
"${VORBIS_DIR}/lib/scales.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_11.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_22.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_32.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_44u.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_8.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_X.h"
|
||||
"${VORBIS_DIR}/lib/window.h"
|
||||
)
|
||||
"${VORBIS_DIR}/lib/backends.h"
|
||||
"${VORBIS_DIR}/lib/bitrate.h"
|
||||
"${VORBIS_DIR}/lib/codebook.h"
|
||||
"${VORBIS_DIR}/include/vorbis/codec.h"
|
||||
"${VORBIS_DIR}/lib/codec_internal.h"
|
||||
"${VORBIS_DIR}/lib/envelope.h"
|
||||
"${VORBIS_DIR}/lib/modes/floor_all.h"
|
||||
"${VORBIS_DIR}/lib/books/floor/floor_books.h"
|
||||
"${VORBIS_DIR}/lib/highlevel.h"
|
||||
"${VORBIS_DIR}/lib/lookup.h"
|
||||
"${VORBIS_DIR}/lib/lookup_data.h"
|
||||
"${VORBIS_DIR}/lib/lpc.h"
|
||||
"${VORBIS_DIR}/lib/lsp.h"
|
||||
"${VORBIS_DIR}/lib/masking.h"
|
||||
"${VORBIS_DIR}/lib/mdct.h"
|
||||
"${VORBIS_DIR}/lib/misc.h"
|
||||
"${VORBIS_DIR}/lib/os.h"
|
||||
"${VORBIS_DIR}/lib/psy.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_11.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/psych_8.h"
|
||||
"${VORBIS_DIR}/lib/registry.h"
|
||||
"${VORBIS_DIR}/lib/books/coupled/res_books_stereo.h"
|
||||
"${VORBIS_DIR}/lib/books/uncoupled/res_books_uncoupled.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_44u.h"
|
||||
"${VORBIS_DIR}/lib/modes/residue_8.h"
|
||||
"${VORBIS_DIR}/lib/scales.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_11.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_16.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_22.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_32.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_44.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_44u.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_8.h"
|
||||
"${VORBIS_DIR}/lib/modes/setup_X.h"
|
||||
"${VORBIS_DIR}/lib/window.h")
|
||||
|
||||
source_group("Source Files" FILES ${VORBIS_SRC})
|
||||
source_group("Header Files" FILES ${VORBIS_HPP})
|
||||
@@ -76,15 +74,12 @@ set_property(TARGET "vorbis" PROPERTY FOLDER "External Libraries")
|
||||
disable_project_warnings("vorbis")
|
||||
|
||||
list(APPEND VORBIS_INCLUDE_DIRS
|
||||
"${VORBIS_DIR}/lib"
|
||||
"${VORBIS_DIR}/include"
|
||||
"${SM_EXTERN_DIR}/newogg/include"
|
||||
)
|
||||
"${VORBIS_DIR}/lib"
|
||||
"${VORBIS_DIR}/include"
|
||||
"${SM_EXTERN_DIR}/newogg/include")
|
||||
|
||||
target_include_directories("vorbis" PUBLIC ${VORBIS_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND VORBIS_LINK_LIBS
|
||||
"ogg"
|
||||
)
|
||||
list(APPEND VORBIS_LINK_LIBS "ogg")
|
||||
|
||||
target_link_libraries("vorbis" ${VORBIS_LINK_LIBS})
|
||||
|
||||
Vendored
+4
-12
@@ -1,12 +1,8 @@
|
||||
set(VORBISFILE_DIR "${SM_EXTERN_DIR}/newvorbis")
|
||||
|
||||
list(APPEND VORBISFILE_SRC
|
||||
"${VORBISFILE_DIR}/lib/vorbisfile.c"
|
||||
)
|
||||
list(APPEND VORBISFILE_SRC "${VORBISFILE_DIR}/lib/vorbisfile.c")
|
||||
|
||||
list(APPEND VORBISFILE_HPP
|
||||
"${VORBISFILE_DIR}/include/vorbis/vorbisfile.h"
|
||||
)
|
||||
list(APPEND VORBISFILE_HPP "${VORBISFILE_DIR}/include/vorbis/vorbisfile.h")
|
||||
|
||||
source_group("Source Files" FILES ${VORBISFILE_SRC})
|
||||
source_group("Header Files" FILES ${VORBISFILE_HPP})
|
||||
@@ -17,14 +13,10 @@ set_property(TARGET "vorbisfile" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("vorbisfile")
|
||||
|
||||
list(APPEND VORBIS_INCLUDE_DIRS
|
||||
"${VORBISDIR_DIR}/include"
|
||||
)
|
||||
list(APPEND VORBIS_INCLUDE_DIRS "${VORBISDIR_DIR}/include")
|
||||
|
||||
target_include_directories("vorbisfile" PUBLIC ${VORBIS_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND VORBISFILE_LINK_LIBS
|
||||
"ogg"
|
||||
)
|
||||
list(APPEND VORBISFILE_LINK_LIBS "ogg")
|
||||
|
||||
target_link_libraries("vorbisfile" ${VORBISFILE_LINK_LIBS})
|
||||
|
||||
Vendored
+40
-38
@@ -1,44 +1,46 @@
|
||||
list(APPEND ZLIB_SRC
|
||||
"zlib/adler32.c"
|
||||
"zlib/compress.c"
|
||||
"zlib/crc32.c"
|
||||
"zlib/deflate.c"
|
||||
"zlib/gzclose.c"
|
||||
"zlib/gzlib.c"
|
||||
"zlib/gzread.c"
|
||||
"zlib/gzwrite.c"
|
||||
"zlib/infback.c"
|
||||
"zlib/inffast.c"
|
||||
"zlib/inflate.c"
|
||||
"zlib/inftrees.c"
|
||||
"zlib/minigzip.c"
|
||||
"zlib/trees.c"
|
||||
"zlib/uncompr.c"
|
||||
"zlib/zutil.c"
|
||||
)
|
||||
if(WITH_SYSTEM_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else()
|
||||
list(APPEND ZLIB_SRC
|
||||
"zlib/adler32.c"
|
||||
"zlib/compress.c"
|
||||
"zlib/crc32.c"
|
||||
"zlib/deflate.c"
|
||||
"zlib/gzclose.c"
|
||||
"zlib/gzlib.c"
|
||||
"zlib/gzread.c"
|
||||
"zlib/gzwrite.c"
|
||||
"zlib/infback.c"
|
||||
"zlib/inffast.c"
|
||||
"zlib/inflate.c"
|
||||
"zlib/inftrees.c"
|
||||
"zlib/minigzip.c"
|
||||
"zlib/trees.c"
|
||||
"zlib/uncompr.c"
|
||||
"zlib/zutil.c")
|
||||
|
||||
list(APPEND ZLIB_HPP
|
||||
"zlib/crc32.h"
|
||||
"zlib/deflate.h"
|
||||
"zlib/gzguts.h"
|
||||
"zlib/inffast.h"
|
||||
"zlib/inffixed.h"
|
||||
"zlib/inflate.h"
|
||||
"zlib/inftrees.h"
|
||||
"zlib/trees.h"
|
||||
"zlib/zconf.h"
|
||||
"zlib/zlib.h"
|
||||
"zlib/zutil.h"
|
||||
)
|
||||
list(APPEND ZLIB_HPP
|
||||
"zlib/crc32.h"
|
||||
"zlib/deflate.h"
|
||||
"zlib/gzguts.h"
|
||||
"zlib/inffast.h"
|
||||
"zlib/inffixed.h"
|
||||
"zlib/inflate.h"
|
||||
"zlib/inftrees.h"
|
||||
"zlib/trees.h"
|
||||
"zlib/zconf.h"
|
||||
"zlib/zlib.h"
|
||||
"zlib/zutil.h")
|
||||
|
||||
source_group("" FILES ${ZLIB_SRC} ${ZLIB_HPP})
|
||||
source_group("" FILES ${ZLIB_SRC} ${ZLIB_HPP})
|
||||
|
||||
add_library("zlib" ${ZLIB_SRC} ${ZLIB_HPP})
|
||||
add_library("zlib" ${ZLIB_SRC} ${ZLIB_HPP})
|
||||
|
||||
set_property(TARGET "zlib" PROPERTY FOLDER "External Libraries")
|
||||
set_property(TARGET "zlib" PROPERTY FOLDER "External Libraries")
|
||||
|
||||
disable_project_warnings("zlib")
|
||||
disable_project_warnings("zlib")
|
||||
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("zlib" _MBCS)
|
||||
endif(MSVC)
|
||||
if(MSVC)
|
||||
sm_add_compile_definition("zlib" _MBCS)
|
||||
endif(MSVC)
|
||||
endif()
|
||||
|
||||
Vendored
+136
-140
@@ -2,9 +2,8 @@
|
||||
|
||||
# Copyright (C) 2007-2011 Glenn Randers-Pehrson
|
||||
|
||||
# This code is released under the libpng license.
|
||||
# For conditions of distribution and use, see the disclaimer
|
||||
# and license in png.h
|
||||
# This code is released under the libpng license. For conditions of distribution
|
||||
# and use, see the disclaimer and license in png.h
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.4)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
@@ -12,16 +11,16 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
|
||||
# workaround CMake 2.4.x bug
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are:
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo"
|
||||
CACHE STRING "Choose the type of build, options are:
|
||||
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
|
||||
Debug
|
||||
Release
|
||||
RelWithDebInfo
|
||||
MinSizeRel.")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are:
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo"
|
||||
CACHE STRING "Choose the type of build, options are:
|
||||
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
|
||||
Debug
|
||||
Release
|
||||
@@ -44,13 +43,10 @@ find_package(ZLIB REQUIRED)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(NOT WIN32)
|
||||
find_library(M_LIBRARY
|
||||
NAMES m
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
find_library(M_LIBRARY NAMES m PATHS /usr/lib /usr/local/lib)
|
||||
if(NOT M_LIBRARY)
|
||||
message(STATUS
|
||||
"math library 'libm' not found - floating point support disabled")
|
||||
message(
|
||||
STATUS "math library 'libm' not found - floating point support disabled")
|
||||
endif()
|
||||
else()
|
||||
# not needed on windows
|
||||
@@ -69,11 +65,11 @@ else()
|
||||
option(PNG_STATIC "Build static lib" ON)
|
||||
endif()
|
||||
|
||||
option(PNG_TESTS "Build libpng tests" YES)
|
||||
option(PNG_TESTS "Build libpng tests" YES)
|
||||
|
||||
# Many more configuration options could be added here
|
||||
option(PNG_DEBUG "Build with debug output" NO)
|
||||
option(PNGARG "Disable ANSI-C prototypes" NO)
|
||||
option(PNG_DEBUG "Build with debug output" NO)
|
||||
option(PNGARG "Disable ANSI-C prototypes" NO)
|
||||
|
||||
# SET LIBNAME
|
||||
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
@@ -81,48 +77,39 @@ set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
# to distinguish between debug and release lib
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
# Use the prebuilt pnglibconf.h file from the scripts folder
|
||||
# TODO: fix this by building with awk; without this no cmake build can be
|
||||
# configured directly (to do so indirectly use your local awk to build a
|
||||
# pnglibconf.h in the build directory.)
|
||||
# Use the prebuilt pnglibconf.h file from the scripts folder TODO: fix this by
|
||||
# building with awk; without this no cmake build can be configured directly (to
|
||||
# do so indirectly use your local awk to build a pnglibconf.h in the build
|
||||
# directory.)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# OUR SOURCES
|
||||
set(libpng_public_hdrs
|
||||
png.h
|
||||
pngconf.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h
|
||||
)
|
||||
set(libpng_public_hdrs png.h pngconf.h ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
|
||||
set(libpng_sources
|
||||
${libpng_public_hdrs}
|
||||
pngdebug.h
|
||||
pnginfo.h
|
||||
pngpriv.h
|
||||
pngstruct.h
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
)
|
||||
set(pngtest_sources
|
||||
pngtest.c
|
||||
)
|
||||
set(pngvalid_sources
|
||||
contrib/libtests/pngvalid.c
|
||||
)
|
||||
${libpng_public_hdrs}
|
||||
pngdebug.h
|
||||
pnginfo.h
|
||||
pngpriv.h
|
||||
pngstruct.h
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c)
|
||||
set(pngtest_sources pngtest.c)
|
||||
set(pngvalid_sources contrib/libtests/pngvalid.c)
|
||||
# SOME NEEDED DEFINITIONS
|
||||
|
||||
add_definitions(-DPNG_CONFIGURE_LIBPNG)
|
||||
@@ -149,7 +136,7 @@ if(PNG_SHARED)
|
||||
endif()
|
||||
|
||||
if(PNG_STATIC)
|
||||
# does not work without changing name
|
||||
# does not work without changing name
|
||||
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
||||
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
||||
if(MSVC)
|
||||
@@ -175,26 +162,33 @@ if(PNG_TESTS AND PNG_SHARED)
|
||||
endif()
|
||||
|
||||
# Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set
|
||||
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
|
||||
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
|
||||
endif(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
|
||||
# Set a variable with CMake code which:
|
||||
# Creates a symlink from src to dest (if possible) or alternatively
|
||||
# copies if different.
|
||||
# Set a variable with CMake code which: Creates a symlink from src to dest (if
|
||||
# possible) or alternatively copies if different.
|
||||
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
||||
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||
file(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
|
||||
)
|
||||
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||
add_custom_command(OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}
|
||||
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC})
|
||||
add_custom_target(${DEST_FILE}_COPY ALL
|
||||
DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||
else(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE}
|
||||
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE}
|
||||
${DEST_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||
endmacro()
|
||||
|
||||
@@ -203,47 +197,50 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR lib)
|
||||
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
|
||||
# CREATE PKGCONFIG FILES
|
||||
# we use the same files like ./configure, so we have to set its vars
|
||||
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
||||
# a UNIX look alike
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
# CREATE PKGCONFIG FILES we use the same files like ./configure, so we have to
|
||||
# set its vars Only do this on Windows for Cygwin - the files don't make much
|
||||
# sense outside a UNIX look alike
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set(LIBS "-lz -lm")
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set(LIBS "-lz -lm")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
||||
create_symlink(${PNGLIB_NAME}.pc libpng.pc)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||
create_symlink(${PNGLIB_NAME}-config libpng-config)
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
|
||||
# SET UP LINKS
|
||||
if(PNG_SHARED)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.10
|
||||
VERSION 15.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 15
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
set_target_properties(${PNG_LIB_NAME}
|
||||
PROPERTIES # VERSION 15.${PNGLIB_RELEASE}.1.5.10
|
||||
VERSION
|
||||
15.${PNGLIB_RELEASE}.0
|
||||
SOVERSION
|
||||
15
|
||||
CLEAN_DIRECT_OUTPUT
|
||||
1)
|
||||
endif()
|
||||
if(PNG_STATIC)
|
||||
# MSVC doesn't use a different file extension for shared vs. static
|
||||
# libs. We are able to change OUTPUT_NAME to remove the _static
|
||||
# for all other platforms.
|
||||
# MSVC doesn't use a different file extension for shared vs. static libs. We
|
||||
# are able to change OUTPUT_NAME to remove the _static for all other
|
||||
# platforms.
|
||||
if(NOT MSVC)
|
||||
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
|
||||
OUTPUT_NAME ${PNG_LIB_NAME}
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
set_target_properties(${PNG_LIB_NAME_STATIC}
|
||||
PROPERTIES OUTPUT_NAME
|
||||
${PNG_LIB_NAME}
|
||||
CLEAN_DIRECT_OUTPUT
|
||||
1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If CMake > 2.4.x, we set a variable used below to export
|
||||
# targets to an export file.
|
||||
# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2
|
||||
# If CMake > 2.4.x, we set a variable used below to export targets to an export
|
||||
# file. TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2
|
||||
if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4)
|
||||
set(PNG_EXPORT_RULE EXPORT libpng)
|
||||
elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
|
||||
@@ -251,52 +248,56 @@ elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
|
||||
endif()
|
||||
|
||||
# INSTALL
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
if(PNG_SHARED)
|
||||
install(TARGETS ${PNG_LIB_NAME}
|
||||
${PNG_EXPORT_RULE}
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS ${PNG_LIB_NAME} ${PNG_EXPORT_RULE}
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
# Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
|
||||
if(CYGWIN OR MINGW)
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME}
|
||||
LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||
create_symlink(${BUILD_TARGET_FILE} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(CYGWIN OR MINGW)
|
||||
|
||||
if(NOT WIN32)
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME}
|
||||
LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
create_symlink(${BUILD_TARGET_FILE} libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(NOT WIN32)
|
||||
endif(PNG_SHARED)
|
||||
|
||||
if(PNG_STATIC)
|
||||
install(TARGETS ${PNG_LIB_NAME_STATIC}
|
||||
${PNG_EXPORT_RULE}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS ${PNG_LIB_NAME_STATIC} ${PNG_EXPORT_RULE}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC}
|
||||
LOCATION_${CMAKE_BUILD_TYPE})
|
||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
create_symlink(${BUILD_TARGET_FILE} libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include)
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include)
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
@@ -304,19 +305,18 @@ if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
||||
# Install man pages
|
||||
if(NOT PNG_MAN_DIR)
|
||||
set(PNG_MAN_DIR "share/man")
|
||||
endif()
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
|
||||
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
|
||||
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
|
||||
# Install pkg-config files
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
|
||||
DESTINATION bin)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
@@ -324,21 +324,17 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
endif()
|
||||
|
||||
# On versions of CMake that support it, create an export file CMake
|
||||
# users can include() to import our targets
|
||||
if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
|
||||
# On versions of CMake that support it, create an export file CMake users can
|
||||
# include() to import our targets
|
||||
if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
|
||||
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
|
||||
endif()
|
||||
|
||||
# what's with libpng-$VER%.txt and all the extra files?
|
||||
|
||||
# UNINSTALL
|
||||
# do we need this?
|
||||
# UNINSTALL do we need this?
|
||||
|
||||
# DIST
|
||||
# do we need this?
|
||||
|
||||
# to create msvc import lib for mingw compiled shared lib
|
||||
# pexports libpng.dll > libpng.def
|
||||
# lib /def:libpng.def /machine:x86
|
||||
# DIST do we need this?
|
||||
|
||||
# to create msvc import lib for mingw compiled shared lib pexports libpng.dll >
|
||||
# libpng.def lib /def:libpng.def /machine:x86
|
||||
|
||||
Vendored
+71
-74
@@ -4,7 +4,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
project(zlib C)
|
||||
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON)
|
||||
option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON)
|
||||
endif()
|
||||
|
||||
include(CheckTypeSize)
|
||||
@@ -14,28 +14,27 @@ include(CheckCSourceCompiles)
|
||||
enable_testing()
|
||||
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
|
||||
#
|
||||
# Check to see if we have large file support
|
||||
#
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
||||
# We add these other definitions here because CheckTypeSize.cmake
|
||||
# in CMake 2.4.x does not automatically do so and we want
|
||||
# compatibility with CMake 2.4.x.
|
||||
# We add these other definitions here because CheckTypeSize.cmake in CMake 2.4.x
|
||||
# does not automatically do so and we want compatibility with CMake 2.4.x.
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
|
||||
endif()
|
||||
if(HAVE_STDINT_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
|
||||
endif()
|
||||
if(HAVE_STDDEF_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
|
||||
endif()
|
||||
check_type_size(off64_t OFF64_T)
|
||||
if(HAVE_OFF64_T)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||
|
||||
@@ -44,7 +43,7 @@ set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||
#
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
if(NOT HAVE_FSEEKO)
|
||||
add_definitions(-DNO_FSEEKO)
|
||||
add_definitions(-DNO_FSEEKO)
|
||||
endif()
|
||||
|
||||
#
|
||||
@@ -53,20 +52,20 @@ endif()
|
||||
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# If we're doing an out of source build and the user has a zconf.h
|
||||
# in their source tree...
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
|
||||
message(FATAL_ERROR
|
||||
"You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
|
||||
"from the source tree. This file is included with zlib "
|
||||
"but CMake generates this file for you automatically "
|
||||
"in the build directory.")
|
||||
# If we're doing an out of source build and the user has a zconf.h in their
|
||||
# source tree...
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
|
||||
message(
|
||||
FATAL_ERROR "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
|
||||
"from the source tree. This file is included with zlib "
|
||||
"but CMake generates this file for you automatically "
|
||||
"in the build directory.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -74,15 +73,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
||||
#============================================================================
|
||||
# ============================================================================
|
||||
# zlib
|
||||
#============================================================================
|
||||
# ============================================================================
|
||||
|
||||
set(ZLIB_PUBLIC_HDRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
|
||||
zlib.h
|
||||
)
|
||||
set(ZLIB_PUBLIC_HDRS ${CMAKE_CURRENT_BINARY_DIR}/zconf.h zlib.h)
|
||||
set(ZLIB_PRIVATE_HDRS
|
||||
crc32.h
|
||||
deflate.h
|
||||
@@ -92,8 +87,7 @@ set(ZLIB_PRIVATE_HDRS
|
||||
inflate.h
|
||||
inftrees.h
|
||||
trees.h
|
||||
zutil.h
|
||||
)
|
||||
zutil.h)
|
||||
set(ZLIB_SRCS
|
||||
adler32.c
|
||||
compress.c
|
||||
@@ -110,24 +104,25 @@ set(ZLIB_SRCS
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c
|
||||
win32/zlib1.rc
|
||||
)
|
||||
win32/zlib1.rc)
|
||||
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
||||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*"
|
||||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
||||
string(REGEX
|
||||
REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*"
|
||||
"\\1"
|
||||
ZLIB_FULL_VERSION
|
||||
${_zlib_h_contents})
|
||||
|
||||
if(MINGW)
|
||||
# This gets us DLL resource information when compiling on MinGW.
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
COMMAND windres.exe
|
||||
-D GCC_WINDRES
|
||||
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
# This gets us DLL resource information when compiling on MinGW.
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
COMMAND windres.exe -D GCC_WINDRES -I
|
||||
${CMAKE_CURRENT_SOURCE_DIR} -I
|
||||
${CMAKE_CURRENT_BINARY_DIR} -O
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj -I
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif(MINGW)
|
||||
|
||||
add_library(zlib ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
@@ -136,40 +131,40 @@ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
||||
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
||||
|
||||
if(NOT CYGWIN)
|
||||
# This property causes shared libraries on Linux to have the full version
|
||||
# encoded into their final filename. We disable this on Cygwin because
|
||||
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
|
||||
# seems to be the default.
|
||||
#
|
||||
# This has no effect with MSVC, on that platform the version info for
|
||||
# the DLL comes from the resource file win32/zlib1.rc
|
||||
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
|
||||
# This property causes shared libraries on Linux to have the full version
|
||||
# encoded into their final filename. We disable this on Cygwin because it
|
||||
# causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll seems to be
|
||||
# the default.
|
||||
#
|
||||
# This has no effect with MSVC, on that platform the version info for the DLL
|
||||
# comes from the resource file win32/zlib1.rc
|
||||
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
# On unix-like platforms the library is almost always called libz
|
||||
set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
|
||||
# On unix-like platforms the library is almost always called libz
|
||||
set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
|
||||
elseif(BUILD_SHARED_LIBS AND WIN32)
|
||||
# Creates zlib1.dll when building shared library version
|
||||
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
|
||||
# Creates zlib1.dll when building shared library version
|
||||
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
||||
install(TARGETS zlib
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib )
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
install(TARGETS zlib
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION include)
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION include)
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES zlib.3 DESTINATION share/man/man3)
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES zlib.3 DESTINATION share/man/man3)
|
||||
endif()
|
||||
|
||||
#============================================================================
|
||||
# ============================================================================
|
||||
# Example binaries
|
||||
#============================================================================
|
||||
# ============================================================================
|
||||
|
||||
add_executable(example example.c)
|
||||
target_link_libraries(example zlib)
|
||||
@@ -179,12 +174,14 @@ add_executable(minigzip minigzip.c)
|
||||
target_link_libraries(minigzip zlib)
|
||||
|
||||
if(HAVE_OFF64_T)
|
||||
add_executable(example64 example.c)
|
||||
target_link_libraries(example64 zlib)
|
||||
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||
add_test(example64 example64)
|
||||
add_executable(example64 example.c)
|
||||
target_link_libraries(example64 zlib)
|
||||
set_target_properties(example64
|
||||
PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||
add_test(example64 example64)
|
||||
|
||||
add_executable(minigzip64 minigzip.c)
|
||||
target_link_libraries(minigzip64 zlib)
|
||||
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||
add_executable(minigzip64 minigzip.c)
|
||||
target_link_libraries(minigzip64 zlib)
|
||||
set_target_properties(minigzip64
|
||||
PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||
endif()
|
||||
|
||||
+201
-203
@@ -1,225 +1,223 @@
|
||||
list(APPEND SMDATA_ACTOR_BASE_SRC
|
||||
"Actor.cpp"
|
||||
"ActorFrame.cpp"
|
||||
"ActorFrameTexture.cpp"
|
||||
"ActorMultiTexture.cpp"
|
||||
"ActorMultiVertex.cpp"
|
||||
"ActorProxy.cpp"
|
||||
"ActorScroller.cpp"
|
||||
"ActorSound.cpp"
|
||||
"ActorUtil.cpp"
|
||||
"AutoActor.cpp"
|
||||
"BitmapText.cpp"
|
||||
"DynamicActorScroller.cpp"
|
||||
"Model.cpp"
|
||||
"ModelManager.cpp"
|
||||
"ModelTypes.cpp"
|
||||
"Quad.cpp"
|
||||
"RollingNumbers.cpp"
|
||||
"Sprite.cpp"
|
||||
"Tween.cpp"
|
||||
)
|
||||
"Actor.cpp"
|
||||
"ActorFrame.cpp"
|
||||
"ActorFrameTexture.cpp"
|
||||
"ActorMultiTexture.cpp"
|
||||
"ActorMultiVertex.cpp"
|
||||
"ActorProxy.cpp"
|
||||
"ActorScroller.cpp"
|
||||
"ActorSound.cpp"
|
||||
"ActorUtil.cpp"
|
||||
"AutoActor.cpp"
|
||||
"BitmapText.cpp"
|
||||
"DynamicActorScroller.cpp"
|
||||
"Model.cpp"
|
||||
"ModelManager.cpp"
|
||||
"ModelTypes.cpp"
|
||||
"Quad.cpp"
|
||||
"RollingNumbers.cpp"
|
||||
"Sprite.cpp"
|
||||
"Tween.cpp")
|
||||
list(APPEND SMDATA_ACTOR_BASE_HPP
|
||||
"Actor.h"
|
||||
"ActorFrame.h"
|
||||
"ActorFrameTexture.h"
|
||||
"ActorMultiTexture.h"
|
||||
"ActorMultiVertex.h"
|
||||
"ActorProxy.h"
|
||||
"ActorScroller.h"
|
||||
"ActorSound.h"
|
||||
"ActorUtil.h"
|
||||
"AutoActor.h"
|
||||
"BitmapText.h"
|
||||
"DynamicActorScroller.h"
|
||||
"Model.h"
|
||||
"ModelManager.h"
|
||||
"ModelTypes.h"
|
||||
"Quad.h"
|
||||
"RollingNumbers.h"
|
||||
"Sprite.h"
|
||||
"Tween.h"
|
||||
)
|
||||
"Actor.h"
|
||||
"ActorFrame.h"
|
||||
"ActorFrameTexture.h"
|
||||
"ActorMultiTexture.h"
|
||||
"ActorMultiVertex.h"
|
||||
"ActorProxy.h"
|
||||
"ActorScroller.h"
|
||||
"ActorSound.h"
|
||||
"ActorUtil.h"
|
||||
"AutoActor.h"
|
||||
"BitmapText.h"
|
||||
"DynamicActorScroller.h"
|
||||
"Model.h"
|
||||
"ModelManager.h"
|
||||
"ModelTypes.h"
|
||||
"Quad.h"
|
||||
"RollingNumbers.h"
|
||||
"Sprite.h"
|
||||
"Tween.h")
|
||||
|
||||
source_group("Actors\\\\Base" FILES ${SMDATA_ACTOR_BASE_SRC} ${SMDATA_ACTOR_BASE_HPP})
|
||||
source_group("Actors\\\\Base"
|
||||
FILES
|
||||
${SMDATA_ACTOR_BASE_SRC}
|
||||
${SMDATA_ACTOR_BASE_HPP})
|
||||
|
||||
list(APPEND SMDATA_ACTOR_GAMEPLAY_SRC
|
||||
"ActiveAttackList.cpp"
|
||||
"ArrowEffects.cpp"
|
||||
"AttackDisplay.cpp"
|
||||
"Background.cpp"
|
||||
"BeginnerHelper.cpp"
|
||||
"CombinedLifeMeterTug.cpp"
|
||||
"DancingCharacters.cpp"
|
||||
"Foreground.cpp"
|
||||
"GhostArrowRow.cpp"
|
||||
"HoldJudgment.cpp"
|
||||
"Inventory.cpp"
|
||||
"LifeMeter.cpp"
|
||||
"LifeMeterBar.cpp"
|
||||
"LifeMeterBattery.cpp"
|
||||
"LifeMeterTime.cpp"
|
||||
"LyricDisplay.cpp"
|
||||
"NoteDisplay.cpp"
|
||||
"NoteField.cpp"
|
||||
"PercentageDisplay.cpp"
|
||||
"Player.cpp"
|
||||
"ReceptorArrow.cpp"
|
||||
"ReceptorArrowRow.cpp"
|
||||
"ScoreDisplay.cpp"
|
||||
"ScoreDisplayAliveTime.cpp"
|
||||
"ScoreDisplayBattle.cpp"
|
||||
"ScoreDisplayCalories.cpp"
|
||||
"ScoreDisplayLifeTime.cpp"
|
||||
"ScoreDisplayNormal.cpp"
|
||||
"ScoreDisplayOni.cpp"
|
||||
"ScoreDisplayPercentage.cpp"
|
||||
"ScoreDisplayRave.cpp"
|
||||
)
|
||||
"ActiveAttackList.cpp"
|
||||
"ArrowEffects.cpp"
|
||||
"AttackDisplay.cpp"
|
||||
"Background.cpp"
|
||||
"BeginnerHelper.cpp"
|
||||
"CombinedLifeMeterTug.cpp"
|
||||
"DancingCharacters.cpp"
|
||||
"Foreground.cpp"
|
||||
"GhostArrowRow.cpp"
|
||||
"HoldJudgment.cpp"
|
||||
"Inventory.cpp"
|
||||
"LifeMeter.cpp"
|
||||
"LifeMeterBar.cpp"
|
||||
"LifeMeterBattery.cpp"
|
||||
"LifeMeterTime.cpp"
|
||||
"LyricDisplay.cpp"
|
||||
"NoteDisplay.cpp"
|
||||
"NoteField.cpp"
|
||||
"PercentageDisplay.cpp"
|
||||
"Player.cpp"
|
||||
"ReceptorArrow.cpp"
|
||||
"ReceptorArrowRow.cpp"
|
||||
"ScoreDisplay.cpp"
|
||||
"ScoreDisplayAliveTime.cpp"
|
||||
"ScoreDisplayBattle.cpp"
|
||||
"ScoreDisplayCalories.cpp"
|
||||
"ScoreDisplayLifeTime.cpp"
|
||||
"ScoreDisplayNormal.cpp"
|
||||
"ScoreDisplayOni.cpp"
|
||||
"ScoreDisplayPercentage.cpp"
|
||||
"ScoreDisplayRave.cpp")
|
||||
|
||||
list(APPEND SMDATA_ACTOR_GAMEPLAY_HPP
|
||||
"ActiveAttackList.h"
|
||||
"ArrowEffects.h"
|
||||
"AttackDisplay.h"
|
||||
"Background.h"
|
||||
"BeginnerHelper.h"
|
||||
"CombinedLifeMeter.h"
|
||||
"CombinedLifeMeterTug.h"
|
||||
"DancingCharacters.h"
|
||||
"Foreground.h"
|
||||
"GhostArrowRow.h"
|
||||
"HoldJudgment.h"
|
||||
"Inventory.h"
|
||||
"LifeMeter.h"
|
||||
"LifeMeterBar.h"
|
||||
"LifeMeterBattery.h"
|
||||
"LifeMeterTime.h"
|
||||
"LyricDisplay.h"
|
||||
"NoteDisplay.h"
|
||||
"NoteField.h"
|
||||
"PercentageDisplay.h"
|
||||
"Player.h"
|
||||
"ReceptorArrow.h"
|
||||
"ReceptorArrowRow.h"
|
||||
"ScoreDisplay.h"
|
||||
"ScoreDisplayAliveTime.h"
|
||||
"ScoreDisplayBattle.h"
|
||||
"ScoreDisplayCalories.h"
|
||||
"ScoreDisplayLifeTime.h"
|
||||
"ScoreDisplayNormal.h"
|
||||
"ScoreDisplayOni.h"
|
||||
"ScoreDisplayPercentage.h"
|
||||
"ScoreDisplayRave.h"
|
||||
)
|
||||
source_group("Actors\\\\Gameplay" FILES ${SMDATA_ACTOR_GAMEPLAY_SRC} ${SMDATA_ACTOR_GAMEPLAY_HPP})
|
||||
"ActiveAttackList.h"
|
||||
"ArrowEffects.h"
|
||||
"AttackDisplay.h"
|
||||
"Background.h"
|
||||
"BeginnerHelper.h"
|
||||
"CombinedLifeMeter.h"
|
||||
"CombinedLifeMeterTug.h"
|
||||
"DancingCharacters.h"
|
||||
"Foreground.h"
|
||||
"GhostArrowRow.h"
|
||||
"HoldJudgment.h"
|
||||
"Inventory.h"
|
||||
"LifeMeter.h"
|
||||
"LifeMeterBar.h"
|
||||
"LifeMeterBattery.h"
|
||||
"LifeMeterTime.h"
|
||||
"LyricDisplay.h"
|
||||
"NoteDisplay.h"
|
||||
"NoteField.h"
|
||||
"PercentageDisplay.h"
|
||||
"Player.h"
|
||||
"ReceptorArrow.h"
|
||||
"ReceptorArrowRow.h"
|
||||
"ScoreDisplay.h"
|
||||
"ScoreDisplayAliveTime.h"
|
||||
"ScoreDisplayBattle.h"
|
||||
"ScoreDisplayCalories.h"
|
||||
"ScoreDisplayLifeTime.h"
|
||||
"ScoreDisplayNormal.h"
|
||||
"ScoreDisplayOni.h"
|
||||
"ScoreDisplayPercentage.h"
|
||||
"ScoreDisplayRave.h")
|
||||
source_group("Actors\\\\Gameplay"
|
||||
FILES
|
||||
${SMDATA_ACTOR_GAMEPLAY_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_HPP})
|
||||
|
||||
list(APPEND SMDATA_ACTOR_MENU_SRC
|
||||
"BPMDisplay.cpp"
|
||||
"ComboGraph.cpp"
|
||||
"ControllerStateDisplay.cpp"
|
||||
"CourseContentsList.cpp"
|
||||
"DifficultyList.cpp"
|
||||
"DualScrollBar.cpp"
|
||||
"EditMenu.cpp"
|
||||
"FadingBanner.cpp"
|
||||
"GradeDisplay.cpp"
|
||||
"GraphDisplay.cpp"
|
||||
"GrooveRadar.cpp"
|
||||
"HelpDisplay.cpp"
|
||||
"MemoryCardDisplay.cpp"
|
||||
"MenuTimer.cpp"
|
||||
"ModIcon.cpp"
|
||||
"ModIconRow.cpp"
|
||||
"MusicWheel.cpp"
|
||||
"MusicWheelItem.cpp"
|
||||
"OptionRow.cpp"
|
||||
"OptionsCursor.cpp"
|
||||
"OptionsList.cpp"
|
||||
"PaneDisplay.cpp"
|
||||
"ScrollBar.cpp"
|
||||
"SnapDisplay.cpp"
|
||||
"TextBanner.cpp"
|
||||
"WheelBase.cpp"
|
||||
"WheelItemBase.cpp"
|
||||
"WheelNotifyIcon.cpp"
|
||||
"WorkoutGraph.cpp"
|
||||
)
|
||||
"BPMDisplay.cpp"
|
||||
"ComboGraph.cpp"
|
||||
"ControllerStateDisplay.cpp"
|
||||
"CourseContentsList.cpp"
|
||||
"DifficultyList.cpp"
|
||||
"DualScrollBar.cpp"
|
||||
"EditMenu.cpp"
|
||||
"FadingBanner.cpp"
|
||||
"GradeDisplay.cpp"
|
||||
"GraphDisplay.cpp"
|
||||
"GrooveRadar.cpp"
|
||||
"HelpDisplay.cpp"
|
||||
"MemoryCardDisplay.cpp"
|
||||
"MenuTimer.cpp"
|
||||
"ModIcon.cpp"
|
||||
"ModIconRow.cpp"
|
||||
"MusicWheel.cpp"
|
||||
"MusicWheelItem.cpp"
|
||||
"OptionRow.cpp"
|
||||
"OptionsCursor.cpp"
|
||||
"OptionsList.cpp"
|
||||
"PaneDisplay.cpp"
|
||||
"ScrollBar.cpp"
|
||||
"SnapDisplay.cpp"
|
||||
"TextBanner.cpp"
|
||||
"WheelBase.cpp"
|
||||
"WheelItemBase.cpp"
|
||||
"WheelNotifyIcon.cpp"
|
||||
"WorkoutGraph.cpp")
|
||||
list(APPEND SMDATA_ACTOR_MENU_HPP
|
||||
"BPMDisplay.h"
|
||||
"ComboGraph.h"
|
||||
"ControllerStateDisplay.h"
|
||||
"CourseContentsList.h"
|
||||
"DifficultyList.h"
|
||||
"DualScrollBar.h"
|
||||
"EditMenu.h"
|
||||
"FadingBanner.h"
|
||||
"GradeDisplay.h"
|
||||
"GraphDisplay.h"
|
||||
"GrooveRadar.h"
|
||||
"HelpDisplay.h"
|
||||
"MemoryCardDisplay.h"
|
||||
"MenuTimer.h"
|
||||
"ModIcon.h"
|
||||
"ModIconRow.h"
|
||||
"MusicWheel.h"
|
||||
"MusicWheelItem.h"
|
||||
"OptionRow.h"
|
||||
"OptionsCursor.h"
|
||||
"OptionsList.h"
|
||||
"PaneDisplay.h"
|
||||
"ScrollBar.h"
|
||||
"SnapDisplay.h"
|
||||
"TextBanner.h"
|
||||
"WheelBase.h"
|
||||
"WheelItemBase.h"
|
||||
"WheelNotifyIcon.h"
|
||||
"WorkoutGraph.h"
|
||||
)
|
||||
"BPMDisplay.h"
|
||||
"ComboGraph.h"
|
||||
"ControllerStateDisplay.h"
|
||||
"CourseContentsList.h"
|
||||
"DifficultyList.h"
|
||||
"DualScrollBar.h"
|
||||
"EditMenu.h"
|
||||
"FadingBanner.h"
|
||||
"GradeDisplay.h"
|
||||
"GraphDisplay.h"
|
||||
"GrooveRadar.h"
|
||||
"HelpDisplay.h"
|
||||
"MemoryCardDisplay.h"
|
||||
"MenuTimer.h"
|
||||
"ModIcon.h"
|
||||
"ModIconRow.h"
|
||||
"MusicWheel.h"
|
||||
"MusicWheelItem.h"
|
||||
"OptionRow.h"
|
||||
"OptionsCursor.h"
|
||||
"OptionsList.h"
|
||||
"PaneDisplay.h"
|
||||
"ScrollBar.h"
|
||||
"SnapDisplay.h"
|
||||
"TextBanner.h"
|
||||
"WheelBase.h"
|
||||
"WheelItemBase.h"
|
||||
"WheelNotifyIcon.h"
|
||||
"WorkoutGraph.h")
|
||||
|
||||
if(WITH_NETWORKING)
|
||||
list(APPEND SMDATA_ACTOR_MENU_SRC
|
||||
"RoomInfoDisplay.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ACTOR_MENU_HPP
|
||||
"RoomInfoDisplay.h"
|
||||
)
|
||||
list(APPEND SMDATA_ACTOR_MENU_SRC "RoomInfoDisplay.cpp")
|
||||
list(APPEND SMDATA_ACTOR_MENU_HPP "RoomInfoDisplay.h")
|
||||
endif()
|
||||
|
||||
source_group("Actors\\\\Menus" FILES ${SMDATA_ACTOR_MENU_SRC} ${SMDATA_ACTOR_MENU_HPP})
|
||||
source_group("Actors\\\\Menus"
|
||||
FILES
|
||||
${SMDATA_ACTOR_MENU_SRC}
|
||||
${SMDATA_ACTOR_MENU_HPP})
|
||||
|
||||
list(APPEND SMDATA_ACTOR_GAMEPLAY_MENU_SRC
|
||||
"Banner.cpp"
|
||||
"BGAnimation.cpp"
|
||||
"BGAnimationLayer.cpp"
|
||||
"DifficultyIcon.cpp"
|
||||
"MeterDisplay.cpp"
|
||||
"StepsDisplay.cpp"
|
||||
"StreamDisplay.cpp"
|
||||
"Transition.cpp"
|
||||
)
|
||||
"Banner.cpp"
|
||||
"BGAnimation.cpp"
|
||||
"BGAnimationLayer.cpp"
|
||||
"DifficultyIcon.cpp"
|
||||
"MeterDisplay.cpp"
|
||||
"StepsDisplay.cpp"
|
||||
"StreamDisplay.cpp"
|
||||
"Transition.cpp")
|
||||
|
||||
list(APPEND SMDATA_ACTOR_GAMEPLAY_MENU_HPP
|
||||
"Banner.h"
|
||||
"BGAnimation.h"
|
||||
"BGAnimationLayer.h"
|
||||
"DifficultyIcon.h"
|
||||
"MeterDisplay.h"
|
||||
"StepsDisplay.h"
|
||||
"StreamDisplay.h"
|
||||
"Transition.h"
|
||||
)
|
||||
"Banner.h"
|
||||
"BGAnimation.h"
|
||||
"BGAnimationLayer.h"
|
||||
"DifficultyIcon.h"
|
||||
"MeterDisplay.h"
|
||||
"StepsDisplay.h"
|
||||
"StreamDisplay.h"
|
||||
"Transition.h")
|
||||
|
||||
source_group("Actors\\\\Gameplay and Menus" FILES ${SMDATA_ACTOR_GAMEPLAY_MENU_SRC} ${SMDATA_ACTOR_GAMEPLAY_MENU_HPP})
|
||||
source_group("Actors\\\\Gameplay and Menus"
|
||||
FILES
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_HPP})
|
||||
|
||||
list(APPEND SMDATA_ALL_ACTORS_SRC
|
||||
${SMDATA_ACTOR_BASE_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_SRC}
|
||||
${SMDATA_ACTOR_MENU_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_SRC}
|
||||
)
|
||||
${SMDATA_ACTOR_BASE_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_SRC}
|
||||
${SMDATA_ACTOR_MENU_SRC}
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_SRC})
|
||||
list(APPEND SMDATA_ALL_ACTORS_HPP
|
||||
${SMDATA_ACTOR_BASE_HPP}
|
||||
${SMDATA_ACTOR_GAMEPLAY_HPP}
|
||||
${SMDATA_ACTOR_MENU_HPP}
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_HPP}
|
||||
)
|
||||
${SMDATA_ACTOR_BASE_HPP}
|
||||
${SMDATA_ACTOR_GAMEPLAY_HPP}
|
||||
${SMDATA_ACTOR_MENU_HPP}
|
||||
${SMDATA_ACTOR_GAMEPLAY_MENU_HPP})
|
||||
|
||||
+228
-350
@@ -1,507 +1,385 @@
|
||||
list(APPEND SMDATA_ARCH_SRC
|
||||
"arch/RageDriver.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SRC "arch/RageDriver.cpp")
|
||||
|
||||
list(APPEND SMDATA_ARCH_HPP
|
||||
"arch/arch_default.h"
|
||||
"arch/RageDriver.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HPP "arch/arch_default.h" "arch/RageDriver.h")
|
||||
|
||||
source_group("Arch Specific" FILES ${SMDATA_ARCH_SRC} ${SMDATA_ARCH_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP
|
||||
"arch/Threads/Threads.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP "arch/Threads/Threads.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP
|
||||
"arch/Threads/Threads_Win32.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC
|
||||
"arch/Threads/Threads_Win32.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP "arch/Threads/Threads_Win32.h")
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC "arch/Threads/Threads_Win32.cpp")
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP
|
||||
"arch/Threads/Threads_Pthreads.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC
|
||||
"arch/Threads/Threads_Pthreads.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP "arch/Threads/Threads_Pthreads.h")
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC "arch/Threads/Threads_Pthreads.cpp")
|
||||
else()
|
||||
if(HAS_PTHREAD)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP
|
||||
"arch/Threads/Threads_Pthreads.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC
|
||||
"arch/Threads/Threads_Pthreads.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_THREADS_HPP "arch/Threads/Threads_Pthreads.h")
|
||||
list(APPEND SMDATA_ARCH_THREADS_SRC "arch/Threads/Threads_Pthreads.cpp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Threads" FILES ${SMDATA_ARCH_THREADS_SRC} ${SMDATA_ARCH_THREADS_HPP})
|
||||
source_group("Arch Specific\\\\Threads"
|
||||
FILES
|
||||
${SMDATA_ARCH_THREADS_SRC}
|
||||
${SMDATA_ARCH_THREADS_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/RageSoundDriver.cpp"
|
||||
"arch/Sound/RageSoundDriver_Generic_Software.cpp"
|
||||
"arch/Sound/RageSoundDriver_Null.cpp"
|
||||
)
|
||||
"arch/Sound/RageSoundDriver.cpp"
|
||||
"arch/Sound/RageSoundDriver_Generic_Software.cpp"
|
||||
"arch/Sound/RageSoundDriver_Null.cpp")
|
||||
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/RageSoundDriver.h"
|
||||
"arch/Sound/RageSoundDriver_Null.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP "arch/Sound/RageSoundDriver.h"
|
||||
"arch/Sound/RageSoundDriver_Null.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/DSoundHelpers.cpp"
|
||||
"arch/Sound/RageSoundDriver_DSound_Software.cpp"
|
||||
"arch/Sound/RageSoundDriver_WaveOut.cpp"
|
||||
"arch/Sound/RageSoundDriver_WDMKS.cpp"
|
||||
)
|
||||
"arch/Sound/DSoundHelpers.cpp"
|
||||
"arch/Sound/RageSoundDriver_DSound_Software.cpp"
|
||||
"arch/Sound/RageSoundDriver_WaveOut.cpp"
|
||||
"arch/Sound/RageSoundDriver_WDMKS.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/DSoundHelpers.h"
|
||||
"arch/Sound/RageSoundDriver_DSound_Software.h"
|
||||
"arch/Sound/RageSoundDriver_WaveOut.h"
|
||||
"arch/Sound/RageSoundDriver_WDMKS.h"
|
||||
)
|
||||
"arch/Sound/DSoundHelpers.h"
|
||||
"arch/Sound/RageSoundDriver_DSound_Software.h"
|
||||
"arch/Sound/RageSoundDriver_WaveOut.h"
|
||||
"arch/Sound/RageSoundDriver_WDMKS.h")
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/RageSoundDriver_AU.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/RageSoundDriver_AU.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC "arch/Sound/RageSoundDriver_AU.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP "arch/Sound/RageSoundDriver_AU.h")
|
||||
else() # Unix
|
||||
if (HAS_PULSE)
|
||||
if(HAS_PULSE)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/RageSoundDriver_PulseAudio.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/RageSoundDriver_PulseAudio.h"
|
||||
)
|
||||
"arch/Sound/RageSoundDriver_PulseAudio.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP "arch/Sound/RageSoundDriver_PulseAudio.h")
|
||||
endif()
|
||||
if (HAS_ALSA)
|
||||
if(HAS_ALSA)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/ALSA9Dynamic.cpp"
|
||||
"arch/Sound/ALSA9Helpers.cpp"
|
||||
"arch/Sound/RageSoundDriver_ALSA9_Software.cpp"
|
||||
)
|
||||
"arch/Sound/ALSA9Dynamic.cpp"
|
||||
"arch/Sound/ALSA9Helpers.cpp"
|
||||
"arch/Sound/RageSoundDriver_ALSA9_Software.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/ALSA9Dynamic.h"
|
||||
"arch/Sound/ALSA9Functions.h"
|
||||
"arch/Sound/ALSA9Helpers.h"
|
||||
"arch/Sound/RageSoundDriver_ALSA9_Software.h"
|
||||
)
|
||||
"arch/Sound/ALSA9Dynamic.h"
|
||||
"arch/Sound/ALSA9Functions.h"
|
||||
"arch/Sound/ALSA9Helpers.h"
|
||||
"arch/Sound/RageSoundDriver_ALSA9_Software.h")
|
||||
endif()
|
||||
if (HAS_JACK)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/RageSoundDriver_JACK.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/RageSoundDriver_JACK.h"
|
||||
)
|
||||
if(HAS_JACK)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC "arch/Sound/RageSoundDriver_JACK.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP "arch/Sound/RageSoundDriver_JACK.h")
|
||||
endif()
|
||||
if (HAS_OSS)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC
|
||||
"arch/Sound/RageSoundDriver_OSS.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP
|
||||
"arch/Sound/RageSoundDriver_OSS.h"
|
||||
)
|
||||
if(HAS_OSS)
|
||||
list(APPEND SMDATA_ARCH_SOUND_SRC "arch/Sound/RageSoundDriver_OSS.cpp")
|
||||
list(APPEND SMDATA_ARCH_SOUND_HPP "arch/Sound/RageSoundDriver_OSS.h")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Sound" FILES ${SMDATA_ARCH_SOUND_SRC} ${SMDATA_ARCH_SOUND_HPP})
|
||||
source_group("Arch Specific\\\\Sound"
|
||||
FILES
|
||||
${SMDATA_ARCH_SOUND_SRC}
|
||||
${SMDATA_ARCH_SOUND_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
|
||||
"arch/MovieTexture/MovieTexture.cpp"
|
||||
"arch/MovieTexture/MovieTexture_Generic.cpp"
|
||||
"arch/MovieTexture/MovieTexture_Null.cpp"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture.cpp"
|
||||
"arch/MovieTexture/MovieTexture_Generic.cpp"
|
||||
"arch/MovieTexture/MovieTexture_Null.cpp")
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
|
||||
"arch/MovieTexture/MovieTexture.h"
|
||||
"arch/MovieTexture/MovieTexture_Generic.h"
|
||||
"arch/MovieTexture/MovieTexture_Null.h"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture.h"
|
||||
"arch/MovieTexture/MovieTexture_Generic.h"
|
||||
"arch/MovieTexture/MovieTexture_Null.h")
|
||||
|
||||
if(APPLE)
|
||||
if (${HAS_FFMPEG})
|
||||
if(${HAS_FFMPEG})
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h")
|
||||
endif()
|
||||
elseif(MSVC)
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h")
|
||||
else() # Unix
|
||||
if (${HAS_FFMPEG})
|
||||
if(${HAS_FFMPEG})
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
|
||||
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h"
|
||||
)
|
||||
"arch/MovieTexture/MovieTexture_FFMpeg.h")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Movie Texture" FILES ${SMDATA_ARCH_MOVIE_TEXTURE_SRC} ${SMDATA_ARCH_MOVIE_TEXTURE_HPP})
|
||||
source_group("Arch Specific\\\\Movie Texture"
|
||||
FILES
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_SRC}
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_MEMORY_SRC
|
||||
"arch/MemoryCard/MemoryCardDriver.cpp"
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Folder.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_MEMORY_SRC "arch/MemoryCard/MemoryCardDriver.cpp"
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Folder.cpp")
|
||||
list(APPEND SMDATA_ARCH_MEMORY_HPP
|
||||
"arch/MemoryCard/MemoryCardDriver.h"
|
||||
"arch/MemoryCard/MemoryCardDriver_Null.h"
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Folder.h"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriver.h"
|
||||
"arch/MemoryCard/MemoryCardDriver_Null.h"
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Folder.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_MEMORY_SRC
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp")
|
||||
list(APPEND SMDATA_ARCH_MEMORY_HPP
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Windows.h"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Windows.h")
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_MEMORY_SRC
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.cpp"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.cpp")
|
||||
list(APPEND SMDATA_ARCH_MEMORY_HPP
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.h"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.h")
|
||||
elseif(LINUX)
|
||||
list(APPEND SMDATA_ARCH_MEMORY_SRC
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp")
|
||||
list(APPEND SMDATA_ARCH_MEMORY_HPP
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Linux.h"
|
||||
)
|
||||
"arch/MemoryCard/MemoryCardDriverThreaded_Linux.h")
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Memory Card" FILES ${SMDATA_ARCH_MEMORY_SRC} ${SMDATA_ARCH_MEMORY_HPP})
|
||||
source_group("Arch Specific\\\\Memory Card"
|
||||
FILES
|
||||
${SMDATA_ARCH_MEMORY_SRC}
|
||||
${SMDATA_ARCH_MEMORY_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_SRC
|
||||
"arch/LowLevelWindow/LowLevelWindow.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_HPP
|
||||
"arch/LowLevelWindow/LowLevelWindow.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_SRC "arch/LowLevelWindow/LowLevelWindow.cpp")
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_HPP "arch/LowLevelWindow/LowLevelWindow.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_SRC
|
||||
"arch/LowLevelWindow/LowLevelWindow_Win32.cpp"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_Win32.cpp")
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_HPP
|
||||
"arch/LowLevelWindow/LowLevelWindow_Win32.h"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_Win32.h")
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_SRC
|
||||
"arch/LowLevelWindow/LowLevelWindow_MacOSX.mm"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_MacOSX.mm")
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_HPP
|
||||
"arch/LowLevelWindow/LowLevelWindow_MacOSX.h"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_MacOSX.h")
|
||||
else(UNIX)
|
||||
if (X11_FOUND)
|
||||
if(X11_FOUND)
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_SRC
|
||||
"arch/LowLevelWindow/LowLevelWindow_X11.cpp"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_X11.cpp")
|
||||
list(APPEND SMDATA_ARCH_LOWLEVEL_HPP
|
||||
"arch/LowLevelWindow/LowLevelWindow_X11.h"
|
||||
)
|
||||
"arch/LowLevelWindow/LowLevelWindow_X11.h")
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
||||
source_group("Arch Specific\\\\Low Level Window" FILES ${SMDATA_ARCH_LOWLEVEL_SRC} ${SMDATA_ARCH_LOWLEVEL_HPP})
|
||||
source_group("Arch Specific\\\\Low Level Window"
|
||||
FILES
|
||||
${SMDATA_ARCH_LOWLEVEL_SRC}
|
||||
${SMDATA_ARCH_LOWLEVEL_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_LOADING_SRC
|
||||
"arch/LoadingWindow/LoadingWindow.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP
|
||||
"arch/LoadingWindow/LoadingWindow.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOADING_SRC "arch/LoadingWindow/LoadingWindow.cpp")
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP "arch/LoadingWindow/LoadingWindow.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_LOADING_SRC
|
||||
"arch/LoadingWindow/LoadingWindow_Win32.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP
|
||||
"arch/LoadingWindow/LoadingWindow_Win32.h"
|
||||
)
|
||||
"arch/LoadingWindow/LoadingWindow_Win32.cpp")
|
||||
list(
|
||||
APPEND SMDATA_ARCH_LOADING_HPP "arch/LoadingWindow/LoadingWindow_Win32.h")
|
||||
else()
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP
|
||||
"arch/LoadingWindow/LoadingWindow_Null.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP "arch/LoadingWindow/LoadingWindow_Null.h")
|
||||
if(APPLE)
|
||||
list(APPEND SMDATA_ARCH_LOADING_SRC
|
||||
"arch/LoadingWindow/LoadingWindow_MacOSX.mm"
|
||||
)
|
||||
"arch/LoadingWindow/LoadingWindow_MacOSX.mm")
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP
|
||||
"arch/LoadingWindow/LoadingWindow_MacOSX.h"
|
||||
)
|
||||
"arch/LoadingWindow/LoadingWindow_MacOSX.h")
|
||||
elseif(LINUX)
|
||||
if (GTK2_FOUND)
|
||||
if(GTK2_FOUND)
|
||||
list(APPEND SMDATA_ARCH_LOADING_SRC
|
||||
"arch/LoadingWindow/LoadingWindow_Gtk.cpp"
|
||||
)
|
||||
"arch/LoadingWindow/LoadingWindow_Gtk.cpp")
|
||||
list(APPEND SMDATA_ARCH_LOADING_HPP
|
||||
"arch/LoadingWindow/LoadingWindow_Gtk.h"
|
||||
)
|
||||
"arch/LoadingWindow/LoadingWindow_Gtk.h")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Loading Window" FILES ${SMDATA_ARCH_LOADING_SRC} ${SMDATA_ARCH_LOADING_HPP})
|
||||
source_group("Arch Specific\\\\Loading Window"
|
||||
FILES
|
||||
${SMDATA_ARCH_LOADING_SRC}
|
||||
${SMDATA_ARCH_LOADING_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver.cpp"
|
||||
"arch/Lights/LightsDriver_SystemMessage.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver.h"
|
||||
"arch/Lights/LightsDriver_SystemMessage.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC "arch/Lights/LightsDriver.cpp"
|
||||
"arch/Lights/LightsDriver_SystemMessage.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP "arch/Lights/LightsDriver.h"
|
||||
"arch/Lights/LightsDriver_SystemMessage.h")
|
||||
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_SextetStream.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_SextetStream.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC "arch/Lights/LightsDriver_SextetStream.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP "arch/Lights/LightsDriver_SextetStream.h")
|
||||
|
||||
# TODO: Confirm if Apple can use the export.
|
||||
if(NOT APPLE)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_Export.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_Export.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC "arch/Lights/LightsDriver_Export.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP "arch/Lights/LightsDriver_Export.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_Win32Parallel.cpp"
|
||||
)
|
||||
"arch/Lights/LightsDriver_Win32Parallel.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_Win32Parallel.h"
|
||||
)
|
||||
if (WITH_MINIMAID)
|
||||
"arch/Lights/LightsDriver_Win32Parallel.h")
|
||||
if(WITH_MINIMAID)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_Win32Minimaid.cpp"
|
||||
)
|
||||
"arch/Lights/LightsDriver_Win32Minimaid.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_Win32Minimaid.h"
|
||||
)
|
||||
"arch/Lights/LightsDriver_Win32Minimaid.h")
|
||||
endif()
|
||||
else() # Unix/Linux TODO: Linux HAVE_PARALLEL_PORT
|
||||
if(LINUX)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO.cpp"
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp"
|
||||
"arch/Lights/LightsDriver_LinuxWeedTech.cpp"
|
||||
"arch/Lights/LightsDriver_LinuxParallel.cpp"
|
||||
)
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO.cpp"
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp"
|
||||
"arch/Lights/LightsDriver_LinuxWeedTech.cpp"
|
||||
"arch/Lights/LightsDriver_LinuxParallel.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO.h"
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO_Leds.h"
|
||||
"arch/Lights/LightsDriver_LinuxWeedTech.h"
|
||||
"arch/Lights/LightsDriver_LinuxParallel.h"
|
||||
)
|
||||
if (WITH_PARALLEL_PORT)
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO.h"
|
||||
"arch/Lights/LightsDriver_Linux_PIUIO_Leds.h"
|
||||
"arch/Lights/LightsDriver_LinuxWeedTech.h"
|
||||
"arch/Lights/LightsDriver_LinuxParallel.h")
|
||||
if(WITH_PARALLEL_PORT)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_LinuxParallel.cpp"
|
||||
)
|
||||
"arch/Lights/LightsDriver_LinuxParallel.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_LinuxParallel.h"
|
||||
)
|
||||
"arch/Lights/LightsDriver_LinuxParallel.h")
|
||||
endif()
|
||||
if (WITH_MINIMAID)
|
||||
if(WITH_MINIMAID)
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_SRC
|
||||
"arch/Lights/LightsDriver_LinuxMinimaid.cpp"
|
||||
)
|
||||
"arch/Lights/LightsDriver_LinuxMinimaid.cpp")
|
||||
list(APPEND SMDATA_ARCH_LIGHTS_HPP
|
||||
"arch/Lights/LightsDriver_LinuxMinimaid.h"
|
||||
)
|
||||
"arch/Lights/LightsDriver_LinuxMinimaid.h")
|
||||
endif()
|
||||
endif()
|
||||
endif(WIN32)
|
||||
endif(NOT APPLE)
|
||||
|
||||
source_group("Arch Specific\\\\Lights" FILES ${SMDATA_ARCH_LIGHTS_SRC} ${SMDATA_ARCH_LIGHTS_HPP})
|
||||
source_group("Arch Specific\\\\Lights"
|
||||
FILES
|
||||
${SMDATA_ARCH_LIGHTS_SRC}
|
||||
${SMDATA_ARCH_LIGHTS_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler.cpp"
|
||||
"arch/InputHandler/InputHandler_MonkeyKeyboard.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler.h"
|
||||
"arch/InputHandler/InputHandler_MonkeyKeyboard.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC "arch/InputHandler/InputHandler.cpp"
|
||||
"arch/InputHandler/InputHandler_MonkeyKeyboard.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP "arch/InputHandler/InputHandler.h"
|
||||
"arch/InputHandler/InputHandler_MonkeyKeyboard.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler_DirectInput.cpp"
|
||||
"arch/InputHandler/InputHandler_DirectInputHelper.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_MIDI.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_Para.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_Pump.cpp"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_DirectInput.cpp"
|
||||
"arch/InputHandler/InputHandler_DirectInputHelper.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_MIDI.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_Para.cpp"
|
||||
"arch/InputHandler/InputHandler_Win32_Pump.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler_DirectInput.h"
|
||||
"arch/InputHandler/InputHandler_DirectInputHelper.h"
|
||||
"arch/InputHandler/InputHandler_Win32_MIDI.h"
|
||||
"arch/InputHandler/InputHandler_Win32_Para.h"
|
||||
"arch/InputHandler/InputHandler_Win32_Pump.h"
|
||||
)
|
||||
if (NOT MSVC)
|
||||
"arch/InputHandler/InputHandler_DirectInput.h"
|
||||
"arch/InputHandler/InputHandler_DirectInputHelper.h"
|
||||
"arch/InputHandler/InputHandler_Win32_MIDI.h"
|
||||
"arch/InputHandler/InputHandler_Win32_Para.h"
|
||||
"arch/InputHandler/InputHandler_Win32_Pump.h")
|
||||
if(NOT MSVC)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler_SextetStream.cpp"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_SextetStream.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler_SextetStream.h"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_SextetStream.h")
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler_MacOSX_HID.cpp"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_MacOSX_HID.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler_MacOSX_HID.h"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_MacOSX_HID.h")
|
||||
else() # Unix/Linux
|
||||
if (LINUX)
|
||||
if(LINUX)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/LinuxInputManager.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_Joystick.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_Event.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_PIUIO.cpp"
|
||||
"arch/InputHandler/InputHandler_SextetStream.cpp"
|
||||
)
|
||||
"arch/InputHandler/LinuxInputManager.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_Joystick.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_Event.cpp"
|
||||
"arch/InputHandler/InputHandler_Linux_PIUIO.cpp"
|
||||
"arch/InputHandler/InputHandler_SextetStream.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/LinuxInputManager.h"
|
||||
"arch/InputHandler/InputHandler_Linux_Joystick.h"
|
||||
"arch/InputHandler/InputHandler_Linux_Event.h"
|
||||
"arch/InputHandler/InputHandler_Linux_PIUIO.h"
|
||||
"arch/InputHandler/InputHandler_SextetStream.h"
|
||||
)
|
||||
"arch/InputHandler/LinuxInputManager.h"
|
||||
"arch/InputHandler/InputHandler_Linux_Joystick.h"
|
||||
"arch/InputHandler/InputHandler_Linux_Event.h"
|
||||
"arch/InputHandler/InputHandler_Linux_PIUIO.h"
|
||||
"arch/InputHandler/InputHandler_SextetStream.h")
|
||||
if(WITH_TTY)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler_Linux_tty.cpp"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_Linux_tty.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler_Linux_tty.h"
|
||||
"arch/InputHandler/InputHandler_Linux_tty_keys.h"
|
||||
)
|
||||
"arch/InputHandler/InputHandler_Linux_tty.h"
|
||||
"arch/InputHandler/InputHandler_Linux_tty_keys.h")
|
||||
endif()
|
||||
endif()
|
||||
if(X11_FOUND)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC
|
||||
"arch/InputHandler/InputHandler_X11.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP
|
||||
"arch/InputHandler/InputHandler_X11.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_INPUT_SRC "arch/InputHandler/InputHandler_X11.cpp")
|
||||
list(APPEND SMDATA_ARCH_INPUT_HPP "arch/InputHandler/InputHandler_X11.h")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Arch Specific\\\\Input Handler" FILES ${SMDATA_ARCH_INPUT_SRC} ${SMDATA_ARCH_INPUT_HPP})
|
||||
source_group("Arch Specific\\\\Input Handler"
|
||||
FILES
|
||||
${SMDATA_ARCH_INPUT_SRC}
|
||||
${SMDATA_ARCH_INPUT_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC
|
||||
"arch/Dialog/Dialog.cpp"
|
||||
"arch/Dialog/DialogDriver.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP
|
||||
"arch/Dialog/Dialog.h"
|
||||
"arch/Dialog/DialogDriver.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC "arch/Dialog/Dialog.cpp"
|
||||
"arch/Dialog/DialogDriver.cpp")
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP "arch/Dialog/Dialog.h"
|
||||
"arch/Dialog/DialogDriver.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC
|
||||
"arch/Dialog/DialogDriver_Win32.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP
|
||||
"arch/Dialog/DialogDriver_Win32.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC "arch/Dialog/DialogDriver_Win32.cpp")
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP "arch/Dialog/DialogDriver_Win32.h")
|
||||
elseif(APPLE)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC
|
||||
"arch/Dialog/DialogDriver_MacOSX.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP
|
||||
"arch/Dialog/DialogDriver_MacOSX.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_DIALOG_SRC "arch/Dialog/DialogDriver_MacOSX.cpp")
|
||||
list(APPEND SMDATA_ARCH_DIALOG_HPP "arch/Dialog/DialogDriver_MacOSX.h")
|
||||
endif(WIN32)
|
||||
|
||||
source_group("Arch Specific\\\\Dialog" FILES ${SMDATA_ARCH_DIALOG_SRC} ${SMDATA_ARCH_DIALOG_HPP})
|
||||
source_group("Arch Specific\\\\Dialog"
|
||||
FILES
|
||||
${SMDATA_ARCH_DIALOG_SRC}
|
||||
${SMDATA_ARCH_DIALOG_HPP})
|
||||
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC
|
||||
"arch/ArchHooks/ArchHooks.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP
|
||||
"arch/ArchHooks/ArchHooks.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC "arch/ArchHooks/ArchHooks.cpp")
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP "arch/ArchHooks/ArchHooks.h")
|
||||
|
||||
if(NOT APPLE)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC
|
||||
"arch/ArchHooks/ArchHooksUtil.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC "arch/ArchHooks/ArchHooksUtil.cpp")
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC
|
||||
"arch/ArchHooks/ArchHooks_Win32.cpp"
|
||||
"arch/ArchHooks/ArchHooks_Win32Static.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP
|
||||
"arch/ArchHooks/ArchHooks_Win32.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC "arch/ArchHooks/ArchHooks_Win32.cpp"
|
||||
"arch/ArchHooks/ArchHooks_Win32Static.cpp")
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP "arch/ArchHooks/ArchHooks_Win32.h")
|
||||
else(WIN32)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC
|
||||
"arch/ArchHooks/ArchHooks_Unix.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP
|
||||
"arch/ArchHooks/ArchHooks_Unix.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC "arch/ArchHooks/ArchHooks_Unix.cpp")
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP "arch/ArchHooks/ArchHooks_Unix.h")
|
||||
endif(WIN32)
|
||||
else(NOT APPLE)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC
|
||||
"arch/ArchHooks/ArchHooks_MacOSX.mm"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP
|
||||
"arch/ArchHooks/ArchHooks_MacOSX.h"
|
||||
)
|
||||
list(APPEND SMDATA_ARCH_HOOKS_SRC "arch/ArchHooks/ArchHooks_MacOSX.mm")
|
||||
list(APPEND SMDATA_ARCH_HOOKS_HPP "arch/ArchHooks/ArchHooks_MacOSX.h")
|
||||
endif(NOT APPLE)
|
||||
|
||||
source_group("Arch Specific\\\\Arch Hooks" FILES ${SMDATA_ARCH_HOOKS_SRC} ${SMDATA_ARCH_HOOKS_HPP})
|
||||
source_group("Arch Specific\\\\Arch Hooks"
|
||||
FILES
|
||||
${SMDATA_ARCH_HOOKS_SRC}
|
||||
${SMDATA_ARCH_HOOKS_HPP})
|
||||
|
||||
list(APPEND SMDATA_ALL_ARCH_SRC
|
||||
${SMDATA_ARCH_SRC}
|
||||
${SMDATA_ARCH_DIALOG_SRC}
|
||||
${SMDATA_ARCH_HOOKS_SRC}
|
||||
${SMDATA_ARCH_INPUT_SRC}
|
||||
${SMDATA_ARCH_LIGHTS_SRC}
|
||||
${SMDATA_ARCH_LOADING_SRC}
|
||||
${SMDATA_ARCH_LOWLEVEL_SRC}
|
||||
${SMDATA_ARCH_MEMORY_SRC}
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_SRC}
|
||||
${SMDATA_ARCH_SOUND_SRC}
|
||||
${SMDATA_ARCH_THREADS_SRC}
|
||||
)
|
||||
${SMDATA_ARCH_SRC}
|
||||
${SMDATA_ARCH_DIALOG_SRC}
|
||||
${SMDATA_ARCH_HOOKS_SRC}
|
||||
${SMDATA_ARCH_INPUT_SRC}
|
||||
${SMDATA_ARCH_LIGHTS_SRC}
|
||||
${SMDATA_ARCH_LOADING_SRC}
|
||||
${SMDATA_ARCH_LOWLEVEL_SRC}
|
||||
${SMDATA_ARCH_MEMORY_SRC}
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_SRC}
|
||||
${SMDATA_ARCH_SOUND_SRC}
|
||||
${SMDATA_ARCH_THREADS_SRC})
|
||||
list(APPEND SMDATA_ALL_ARCH_HPP
|
||||
${SMDATA_ARCH_HPP}
|
||||
${SMDATA_ARCH_DIALOG_HPP}
|
||||
${SMDATA_ARCH_HOOKS_HPP}
|
||||
${SMDATA_ARCH_INPUT_HPP}
|
||||
${SMDATA_ARCH_LIGHTS_HPP}
|
||||
${SMDATA_ARCH_LOADING_HPP}
|
||||
${SMDATA_ARCH_LOWLEVEL_HPP}
|
||||
${SMDATA_ARCH_MEMORY_HPP}
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_HPP}
|
||||
${SMDATA_ARCH_SOUND_HPP}
|
||||
${SMDATA_ARCH_THREADS_HPP}
|
||||
)
|
||||
${SMDATA_ARCH_HPP}
|
||||
${SMDATA_ARCH_DIALOG_HPP}
|
||||
${SMDATA_ARCH_HOOKS_HPP}
|
||||
${SMDATA_ARCH_INPUT_HPP}
|
||||
${SMDATA_ARCH_LIGHTS_HPP}
|
||||
${SMDATA_ARCH_LOADING_HPP}
|
||||
${SMDATA_ARCH_LOWLEVEL_HPP}
|
||||
${SMDATA_ARCH_MEMORY_HPP}
|
||||
${SMDATA_ARCH_MOVIE_TEXTURE_HPP}
|
||||
${SMDATA_ARCH_SOUND_HPP}
|
||||
${SMDATA_ARCH_THREADS_HPP})
|
||||
|
||||
+246
-242
@@ -1,298 +1,302 @@
|
||||
list(APPEND SM_DATA_LUA_SRC
|
||||
"LuaBinding.cpp"
|
||||
"LuaExpressionTransform.cpp"
|
||||
"LuaReference.cpp"
|
||||
)
|
||||
"LuaBinding.cpp"
|
||||
"LuaExpressionTransform.cpp"
|
||||
"LuaReference.cpp")
|
||||
|
||||
list(APPEND SM_DATA_LUA_HPP
|
||||
"LuaBinding.h"
|
||||
"LuaExpressionTransform.h"
|
||||
"LuaReference.h"
|
||||
)
|
||||
"LuaBinding.h"
|
||||
"LuaExpressionTransform.h"
|
||||
"LuaReference.h")
|
||||
|
||||
source_group("Data Structures\\\\Lua" FILES ${SM_DATA_LUA_SRC} ${SM_DATA_LUA_HPP})
|
||||
source_group("Data Structures\\\\Lua"
|
||||
FILES
|
||||
${SM_DATA_LUA_SRC}
|
||||
${SM_DATA_LUA_HPP})
|
||||
|
||||
list(APPEND SM_DATA_FONT_SRC
|
||||
"Font.cpp"
|
||||
"FontCharAliases.cpp"
|
||||
"FontCharmaps.cpp"
|
||||
)
|
||||
"Font.cpp"
|
||||
"FontCharAliases.cpp"
|
||||
"FontCharmaps.cpp")
|
||||
|
||||
list(APPEND SM_DATA_FONT_HPP
|
||||
"Font.h"
|
||||
"FontCharAliases.h"
|
||||
"FontCharmaps.h"
|
||||
)
|
||||
"Font.h"
|
||||
"FontCharAliases.h"
|
||||
"FontCharmaps.h")
|
||||
|
||||
source_group("Data Structures\\\\Fonts" FILES ${SM_DATA_FONT_SRC} ${SM_DATA_FONT_HPP})
|
||||
source_group("Data Structures\\\\Fonts"
|
||||
FILES
|
||||
${SM_DATA_FONT_SRC}
|
||||
${SM_DATA_FONT_HPP})
|
||||
|
||||
list(APPEND SM_DATA_COURSE_SRC
|
||||
"Course.cpp"
|
||||
"CourseLoaderCRS.cpp"
|
||||
"CourseUtil.cpp"
|
||||
"CourseWriterCRS.cpp"
|
||||
"Trail.cpp"
|
||||
"TrailUtil.cpp"
|
||||
)
|
||||
"Course.cpp"
|
||||
"CourseLoaderCRS.cpp"
|
||||
"CourseUtil.cpp"
|
||||
"CourseWriterCRS.cpp"
|
||||
"Trail.cpp"
|
||||
"TrailUtil.cpp")
|
||||
|
||||
list(APPEND SM_DATA_COURSE_HPP
|
||||
"Course.h"
|
||||
"CourseLoaderCRS.h"
|
||||
"CourseUtil.h"
|
||||
"CourseWriterCRS.h"
|
||||
"Trail.h"
|
||||
"TrailUtil.h"
|
||||
)
|
||||
"Course.h"
|
||||
"CourseLoaderCRS.h"
|
||||
"CourseUtil.h"
|
||||
"CourseWriterCRS.h"
|
||||
"Trail.h"
|
||||
"TrailUtil.h")
|
||||
|
||||
source_group("Data Structures\\\\Courses and Trails" FILES ${SM_DATA_COURSE_SRC} ${SM_DATA_COURSE_HPP})
|
||||
source_group("Data Structures\\\\Courses and Trails"
|
||||
FILES
|
||||
${SM_DATA_COURSE_SRC}
|
||||
${SM_DATA_COURSE_HPP})
|
||||
|
||||
list(APPEND SM_DATA_NOTEDATA_SRC
|
||||
"NoteData.cpp"
|
||||
"NoteDataUtil.cpp"
|
||||
"NoteDataWithScoring.cpp"
|
||||
)
|
||||
"NoteData.cpp"
|
||||
"NoteDataUtil.cpp"
|
||||
"NoteDataWithScoring.cpp")
|
||||
|
||||
list(APPEND SM_DATA_NOTEDATA_HPP
|
||||
"NoteData.h"
|
||||
"NoteDataUtil.h"
|
||||
"NoteDataWithScoring.h"
|
||||
)
|
||||
"NoteData.h"
|
||||
"NoteDataUtil.h"
|
||||
"NoteDataWithScoring.h")
|
||||
|
||||
source_group("Data Structures\\\\Note Data" FILES ${SM_DATA_NOTEDATA_SRC} ${SM_DATA_NOTEDATA_HPP})
|
||||
source_group("Data Structures\\\\Note Data"
|
||||
FILES
|
||||
${SM_DATA_NOTEDATA_SRC}
|
||||
${SM_DATA_NOTEDATA_HPP})
|
||||
|
||||
list(APPEND SM_DATA_NOTELOAD_SRC
|
||||
"NotesLoader.cpp"
|
||||
"NotesLoaderBMS.cpp"
|
||||
"NotesLoaderDWI.cpp"
|
||||
"NotesLoaderJson.cpp"
|
||||
"NotesLoaderKSF.cpp"
|
||||
"NotesLoaderSM.cpp"
|
||||
"NotesLoaderSMA.cpp"
|
||||
"NotesLoaderSSC.cpp"
|
||||
)
|
||||
"NotesLoader.cpp"
|
||||
"NotesLoaderBMS.cpp"
|
||||
"NotesLoaderDWI.cpp"
|
||||
"NotesLoaderJson.cpp"
|
||||
"NotesLoaderKSF.cpp"
|
||||
"NotesLoaderSM.cpp"
|
||||
"NotesLoaderSMA.cpp"
|
||||
"NotesLoaderSSC.cpp")
|
||||
|
||||
list(APPEND SM_DATA_NOTELOAD_HPP
|
||||
"NotesLoader.h"
|
||||
"NotesLoaderBMS.h"
|
||||
"NotesLoaderDWI.h"
|
||||
"NotesLoaderJson.h"
|
||||
"NotesLoaderKSF.h"
|
||||
"NotesLoaderSM.h"
|
||||
"NotesLoaderSMA.h"
|
||||
"NotesLoaderSSC.h"
|
||||
)
|
||||
"NotesLoader.h"
|
||||
"NotesLoaderBMS.h"
|
||||
"NotesLoaderDWI.h"
|
||||
"NotesLoaderJson.h"
|
||||
"NotesLoaderKSF.h"
|
||||
"NotesLoaderSM.h"
|
||||
"NotesLoaderSMA.h"
|
||||
"NotesLoaderSSC.h")
|
||||
|
||||
source_group("Data Structures\\\\Notes Loaders" FILES ${SM_DATA_NOTELOAD_SRC} ${SM_DATA_NOTELOAD_HPP})
|
||||
source_group("Data Structures\\\\Notes Loaders"
|
||||
FILES
|
||||
${SM_DATA_NOTELOAD_SRC}
|
||||
${SM_DATA_NOTELOAD_HPP})
|
||||
|
||||
list(APPEND SM_DATA_NOTEWRITE_SRC
|
||||
"NotesWriterDWI.cpp"
|
||||
"NotesWriterJson.cpp"
|
||||
"NotesWriterSM.cpp"
|
||||
"NotesWriterSSC.cpp"
|
||||
)
|
||||
"NotesWriterDWI.cpp"
|
||||
"NotesWriterJson.cpp"
|
||||
"NotesWriterSM.cpp"
|
||||
"NotesWriterSSC.cpp")
|
||||
|
||||
list(APPEND SM_DATA_NOTEWRITE_HPP
|
||||
"NotesWriterDWI.h"
|
||||
"NotesWriterJson.h"
|
||||
"NotesWriterSM.h"
|
||||
"NotesWriterSSC.h"
|
||||
)
|
||||
"NotesWriterDWI.h"
|
||||
"NotesWriterJson.h"
|
||||
"NotesWriterSM.h"
|
||||
"NotesWriterSSC.h")
|
||||
|
||||
source_group("Data Structures\\\\Notes Writers" FILES ${SM_DATA_NOTEWRITE_SRC} ${SM_DATA_NOTEWRITE_HPP})
|
||||
source_group("Data Structures\\\\Notes Writers"
|
||||
FILES
|
||||
${SM_DATA_NOTEWRITE_SRC}
|
||||
${SM_DATA_NOTEWRITE_HPP})
|
||||
|
||||
list(APPEND SM_DATA_SCORE_SRC
|
||||
"ScoreKeeper.cpp"
|
||||
"ScoreKeeperNormal.cpp"
|
||||
"ScoreKeeperRave.cpp"
|
||||
"ScoreKeeperShared.cpp"
|
||||
)
|
||||
"ScoreKeeper.cpp"
|
||||
"ScoreKeeperNormal.cpp"
|
||||
"ScoreKeeperRave.cpp"
|
||||
"ScoreKeeperShared.cpp")
|
||||
|
||||
list(APPEND SM_DATA_SCORE_HPP
|
||||
"ScoreKeeper.h"
|
||||
"ScoreKeeperNormal.h"
|
||||
"ScoreKeeperRave.h"
|
||||
"ScoreKeeperShared.h"
|
||||
)
|
||||
"ScoreKeeper.h"
|
||||
"ScoreKeeperNormal.h"
|
||||
"ScoreKeeperRave.h"
|
||||
"ScoreKeeperShared.h")
|
||||
|
||||
source_group("Data Structures\\\\Score Keepers" FILES ${SM_DATA_SCORE_SRC} ${SM_DATA_SCORE_HPP})
|
||||
source_group("Data Structures\\\\Score Keepers"
|
||||
FILES
|
||||
${SM_DATA_SCORE_SRC}
|
||||
${SM_DATA_SCORE_HPP})
|
||||
|
||||
list(APPEND SM_DATA_SONG_SRC
|
||||
"Song.cpp"
|
||||
"SongCacheIndex.cpp"
|
||||
"SongOptions.cpp"
|
||||
"SongPosition.cpp"
|
||||
"SongUtil.cpp"
|
||||
)
|
||||
"Song.cpp"
|
||||
"SongCacheIndex.cpp"
|
||||
"SongOptions.cpp"
|
||||
"SongPosition.cpp"
|
||||
"SongUtil.cpp")
|
||||
|
||||
list(APPEND SM_DATA_SONG_HPP
|
||||
"Song.h"
|
||||
"SongCacheIndex.h"
|
||||
"SongOptions.h"
|
||||
"SongPosition.h"
|
||||
"SongUtil.h"
|
||||
)
|
||||
"Song.h"
|
||||
"SongCacheIndex.h"
|
||||
"SongOptions.h"
|
||||
"SongPosition.h"
|
||||
"SongUtil.h")
|
||||
|
||||
source_group("Data Structures\\\\Songs" FILES ${SM_DATA_SONG_SRC} ${SM_DATA_SONG_HPP})
|
||||
source_group("Data Structures\\\\Songs"
|
||||
FILES
|
||||
${SM_DATA_SONG_SRC}
|
||||
${SM_DATA_SONG_HPP})
|
||||
|
||||
list(APPEND SM_DATA_STEPS_SRC
|
||||
"Steps.cpp"
|
||||
"StepsUtil.cpp"
|
||||
"Style.cpp"
|
||||
"StyleUtil.cpp"
|
||||
)
|
||||
"Steps.cpp"
|
||||
"StepsUtil.cpp"
|
||||
"Style.cpp"
|
||||
"StyleUtil.cpp")
|
||||
|
||||
list(APPEND SM_DATA_STEPS_HPP
|
||||
"Steps.h"
|
||||
"StepsUtil.h"
|
||||
"Style.h"
|
||||
"StyleUtil.h"
|
||||
)
|
||||
"Steps.h"
|
||||
"StepsUtil.h"
|
||||
"Style.h"
|
||||
"StyleUtil.h")
|
||||
|
||||
source_group("Data Structures\\\\Steps and Styles" FILES ${SM_DATA_STEPS_SRC} ${SM_DATA_STEPS_HPP})
|
||||
source_group("Data Structures\\\\Steps and Styles"
|
||||
FILES
|
||||
${SM_DATA_STEPS_SRC}
|
||||
${SM_DATA_STEPS_HPP})
|
||||
|
||||
list(APPEND SM_DATA_REST_SRC
|
||||
"AdjustSync.cpp"
|
||||
"Attack.cpp"
|
||||
"AutoKeysounds.cpp"
|
||||
"BackgroundUtil.cpp"
|
||||
"ImageCache.cpp"
|
||||
"Character.cpp"
|
||||
"CodeDetector.cpp"
|
||||
"CodeSet.cpp"
|
||||
"CubicSpline.cpp"
|
||||
"Command.cpp"
|
||||
"CommonMetrics.cpp"
|
||||
"ControllerStateDisplay.cpp"
|
||||
"CreateZip.cpp"
|
||||
"CryptHelpers.cpp"
|
||||
"DateTime.cpp"
|
||||
"Difficulty.cpp"
|
||||
"DisplaySpec.cpp"
|
||||
"EnumHelper.cpp"
|
||||
"FileDownload.cpp"
|
||||
"Game.cpp"
|
||||
"GameCommand.cpp"
|
||||
"GameConstantsAndTypes.cpp"
|
||||
"GameInput.cpp"
|
||||
"GameplayAssist.cpp"
|
||||
"GamePreferences.cpp"
|
||||
"Grade.cpp"
|
||||
"HighScore.cpp"
|
||||
"Inventory.cpp"
|
||||
"JsonUtil.cpp"
|
||||
"LocalizedString.cpp"
|
||||
"LyricsLoader.cpp"
|
||||
"ModsGroup.cpp"
|
||||
"NoteTypes.cpp"
|
||||
"OptionRowHandler.cpp"
|
||||
"PlayerAI.cpp"
|
||||
"PlayerNumber.cpp"
|
||||
"PlayerOptions.cpp"
|
||||
"PlayerStageStats.cpp"
|
||||
"PlayerState.cpp"
|
||||
"Preference.cpp"
|
||||
"Profile.cpp"
|
||||
"RadarValues.cpp"
|
||||
"RandomSample.cpp"
|
||||
"SampleHistory.cpp"
|
||||
"ScreenDimensions.cpp"
|
||||
"SoundEffectControl.cpp"
|
||||
"StageStats.cpp"
|
||||
"TimingData.cpp"
|
||||
"TimingSegments.cpp"
|
||||
"TitleSubstitution.cpp"
|
||||
)
|
||||
"AdjustSync.cpp"
|
||||
"Attack.cpp"
|
||||
"AutoKeysounds.cpp"
|
||||
"BackgroundUtil.cpp"
|
||||
"ImageCache.cpp"
|
||||
"Character.cpp"
|
||||
"CodeDetector.cpp"
|
||||
"CodeSet.cpp"
|
||||
"CubicSpline.cpp"
|
||||
"Command.cpp"
|
||||
"CommonMetrics.cpp"
|
||||
"ControllerStateDisplay.cpp"
|
||||
"CreateZip.cpp"
|
||||
"CryptHelpers.cpp"
|
||||
"DateTime.cpp"
|
||||
"Difficulty.cpp"
|
||||
"DisplaySpec.cpp"
|
||||
"EnumHelper.cpp"
|
||||
"FileDownload.cpp"
|
||||
"Game.cpp"
|
||||
"GameCommand.cpp"
|
||||
"GameConstantsAndTypes.cpp"
|
||||
"GameInput.cpp"
|
||||
"GameplayAssist.cpp"
|
||||
"GamePreferences.cpp"
|
||||
"Grade.cpp"
|
||||
"HighScore.cpp"
|
||||
"Inventory.cpp"
|
||||
"JsonUtil.cpp"
|
||||
"LocalizedString.cpp"
|
||||
"LyricsLoader.cpp"
|
||||
"ModsGroup.cpp"
|
||||
"NoteTypes.cpp"
|
||||
"OptionRowHandler.cpp"
|
||||
"PlayerAI.cpp"
|
||||
"PlayerNumber.cpp"
|
||||
"PlayerOptions.cpp"
|
||||
"PlayerStageStats.cpp"
|
||||
"PlayerState.cpp"
|
||||
"Preference.cpp"
|
||||
"Profile.cpp"
|
||||
"RadarValues.cpp"
|
||||
"RandomSample.cpp"
|
||||
"SampleHistory.cpp"
|
||||
"ScreenDimensions.cpp"
|
||||
"SoundEffectControl.cpp"
|
||||
"StageStats.cpp"
|
||||
"TimingData.cpp"
|
||||
"TimingSegments.cpp"
|
||||
"TitleSubstitution.cpp")
|
||||
|
||||
list(APPEND SM_DATA_REST_HPP
|
||||
"AdjustSync.h"
|
||||
"Attack.h"
|
||||
"AutoKeysounds.h"
|
||||
"BackgroundUtil.h"
|
||||
"ImageCache.h"
|
||||
"Character.h"
|
||||
"CodeDetector.h"
|
||||
"CodeSet.h"
|
||||
"Command.h"
|
||||
"CommonMetrics.h"
|
||||
"ControllerStateDisplay.h"
|
||||
"CreateZip.h"
|
||||
"CryptHelpers.h"
|
||||
"CubicSpline.h"
|
||||
"DateTime.h"
|
||||
"DisplaySpec.h"
|
||||
"Difficulty.h"
|
||||
"EnumHelper.h"
|
||||
"FileDownload.h"
|
||||
"Foreach.h"
|
||||
"Game.h"
|
||||
"GameCommand.h"
|
||||
"GameConstantsAndTypes.h"
|
||||
"GameInput.h"
|
||||
"GameplayAssist.h"
|
||||
"GamePreferences.h"
|
||||
"Grade.h"
|
||||
"HighScore.h"
|
||||
"InputEventPlus.h"
|
||||
"Inventory.h"
|
||||
"JsonUtil.h"
|
||||
"LocalizedString.h"
|
||||
"LyricsLoader.h"
|
||||
"ModsGroup.h"
|
||||
"NoteTypes.h"
|
||||
"OptionRowHandler.h"
|
||||
"PlayerAI.h"
|
||||
"PlayerNumber.h"
|
||||
"PlayerOptions.h"
|
||||
"PlayerStageStats.h"
|
||||
"PlayerState.h"
|
||||
"Preference.h"
|
||||
"Profile.h"
|
||||
"RadarValues.h"
|
||||
"RandomSample.h"
|
||||
"SampleHistory.h"
|
||||
"ScreenDimensions.h"
|
||||
"SoundEffectControl.h"
|
||||
"SubscriptionManager.h"
|
||||
"StageStats.h"
|
||||
"ThemeMetric.h"
|
||||
"TimingData.h"
|
||||
"TimingSegments.h"
|
||||
"TitleSubstitution.h"
|
||||
)
|
||||
"AdjustSync.h"
|
||||
"Attack.h"
|
||||
"AutoKeysounds.h"
|
||||
"BackgroundUtil.h"
|
||||
"ImageCache.h"
|
||||
"Character.h"
|
||||
"CodeDetector.h"
|
||||
"CodeSet.h"
|
||||
"Command.h"
|
||||
"CommonMetrics.h"
|
||||
"ControllerStateDisplay.h"
|
||||
"CreateZip.h"
|
||||
"CryptHelpers.h"
|
||||
"CubicSpline.h"
|
||||
"DateTime.h"
|
||||
"DisplaySpec.h"
|
||||
"Difficulty.h"
|
||||
"EnumHelper.h"
|
||||
"FileDownload.h"
|
||||
"Foreach.h"
|
||||
"Game.h"
|
||||
"GameCommand.h"
|
||||
"GameConstantsAndTypes.h"
|
||||
"GameInput.h"
|
||||
"GameplayAssist.h"
|
||||
"GamePreferences.h"
|
||||
"Grade.h"
|
||||
"HighScore.h"
|
||||
"InputEventPlus.h"
|
||||
"Inventory.h"
|
||||
"JsonUtil.h"
|
||||
"LocalizedString.h"
|
||||
"LyricsLoader.h"
|
||||
"ModsGroup.h"
|
||||
"NoteTypes.h"
|
||||
"OptionRowHandler.h"
|
||||
"PlayerAI.h"
|
||||
"PlayerNumber.h"
|
||||
"PlayerOptions.h"
|
||||
"PlayerStageStats.h"
|
||||
"PlayerState.h"
|
||||
"Preference.h"
|
||||
"Profile.h"
|
||||
"RadarValues.h"
|
||||
"RandomSample.h"
|
||||
"SampleHistory.h"
|
||||
"ScreenDimensions.h"
|
||||
"SoundEffectControl.h"
|
||||
"SubscriptionManager.h"
|
||||
"StageStats.h"
|
||||
"ThemeMetric.h"
|
||||
"TimingData.h"
|
||||
"TimingSegments.h"
|
||||
"TitleSubstitution.h")
|
||||
|
||||
if(WITH_NETWORKING)
|
||||
list(APPEND SM_DATA_REST_SRC
|
||||
"RoomWheel.cpp"
|
||||
)
|
||||
list(APPEND SM_DATA_REST_HPP
|
||||
"RoomWheel.h"
|
||||
)
|
||||
list(APPEND SM_DATA_REST_SRC "RoomWheel.cpp")
|
||||
list(APPEND SM_DATA_REST_HPP "RoomWheel.h")
|
||||
endif()
|
||||
|
||||
source_group("Data Structures\\\\Misc Objects" FILES ${SM_DATA_REST_SRC} ${SM_DATA_REST_HPP})
|
||||
source_group("Data Structures\\\\Misc Objects"
|
||||
FILES
|
||||
${SM_DATA_REST_SRC}
|
||||
${SM_DATA_REST_HPP})
|
||||
|
||||
list(APPEND SMDATA_ALL_DATA_SRC
|
||||
${SM_DATA_COURSE_SRC}
|
||||
${SM_DATA_FONT_SRC}
|
||||
${SM_DATA_LUA_SRC}
|
||||
${SM_DATA_NOTEDATA_SRC}
|
||||
${SM_DATA_NOTELOAD_SRC}
|
||||
${SM_DATA_NOTEWRITE_SRC}
|
||||
${SM_DATA_SCORE_SRC}
|
||||
${SM_DATA_SONG_SRC}
|
||||
${SM_DATA_STEPS_SRC}
|
||||
${SM_DATA_REST_SRC}
|
||||
)
|
||||
${SM_DATA_COURSE_SRC}
|
||||
${SM_DATA_FONT_SRC}
|
||||
${SM_DATA_LUA_SRC}
|
||||
${SM_DATA_NOTEDATA_SRC}
|
||||
${SM_DATA_NOTELOAD_SRC}
|
||||
${SM_DATA_NOTEWRITE_SRC}
|
||||
${SM_DATA_SCORE_SRC}
|
||||
${SM_DATA_SONG_SRC}
|
||||
${SM_DATA_STEPS_SRC}
|
||||
${SM_DATA_REST_SRC})
|
||||
|
||||
list(APPEND SMDATA_ALL_DATA_HPP
|
||||
${SM_DATA_COURSE_HPP}
|
||||
${SM_DATA_FONT_HPP}
|
||||
${SM_DATA_LUA_HPP}
|
||||
${SM_DATA_NOTEDATA_HPP}
|
||||
${SM_DATA_NOTELOAD_HPP}
|
||||
${SM_DATA_NOTEWRITE_HPP}
|
||||
${SM_DATA_SCORE_HPP}
|
||||
${SM_DATA_SONG_HPP}
|
||||
${SM_DATA_STEPS_HPP}
|
||||
${SM_DATA_REST_HPP}
|
||||
)
|
||||
${SM_DATA_COURSE_HPP}
|
||||
${SM_DATA_FONT_HPP}
|
||||
${SM_DATA_LUA_HPP}
|
||||
${SM_DATA_NOTEDATA_HPP}
|
||||
${SM_DATA_NOTELOAD_HPP}
|
||||
${SM_DATA_NOTEWRITE_HPP}
|
||||
${SM_DATA_SCORE_HPP}
|
||||
${SM_DATA_SONG_HPP}
|
||||
${SM_DATA_STEPS_HPP}
|
||||
${SM_DATA_REST_HPP})
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
list(APPEND SMDATA_FILE_TYPES_SRC
|
||||
"CsvFile.cpp"
|
||||
"IniFile.cpp"
|
||||
"MsdFile.cpp"
|
||||
"XmlFile.cpp"
|
||||
"XmlToLua.cpp"
|
||||
"XmlFileUtil.cpp"
|
||||
)
|
||||
"CsvFile.cpp"
|
||||
"IniFile.cpp"
|
||||
"MsdFile.cpp"
|
||||
"XmlFile.cpp"
|
||||
"XmlToLua.cpp"
|
||||
"XmlFileUtil.cpp")
|
||||
list(APPEND SMDATA_FILE_TYPES_HPP
|
||||
"CsvFile.h"
|
||||
"IniFile.h"
|
||||
"MsdFile.h"
|
||||
"XmlFile.h"
|
||||
"XmlToLua.h"
|
||||
"XmlFileUtil.h"
|
||||
)
|
||||
"CsvFile.h"
|
||||
"IniFile.h"
|
||||
"MsdFile.h"
|
||||
"XmlFile.h"
|
||||
"XmlToLua.h"
|
||||
"XmlFileUtil.h")
|
||||
|
||||
source_group("File Types" FILES ${SMDATA_FILE_TYPES_SRC} ${SMDATA_FILE_TYPES_HPP})
|
||||
source_group("File Types"
|
||||
FILES
|
||||
${SMDATA_FILE_TYPES_SRC}
|
||||
${SMDATA_FILE_TYPES_HPP})
|
||||
|
||||
+18
-15
@@ -1,19 +1,22 @@
|
||||
list(APPEND SMDATA_GLOBAL_FILES_SRC
|
||||
"GameLoop.cpp"
|
||||
"global.cpp"
|
||||
"SpecialFiles.cpp"
|
||||
"StepMania.cpp" # TODO: Refactor into separate main project.
|
||||
"${SM_SRC_DIR}/generated/verstub.cpp"
|
||||
)
|
||||
"GameLoop.cpp"
|
||||
"global.cpp"
|
||||
"SpecialFiles.cpp"
|
||||
"StepMania.cpp" # TODO: Refactor into separate main project.
|
||||
"${SM_SRC_DIR}/generated/verstub.cpp")
|
||||
|
||||
list(APPEND SMDATA_GLOBAL_FILES_HPP
|
||||
"generated/config.hpp"
|
||||
"GameLoop.h"
|
||||
"global.h"
|
||||
"ProductInfo.h" # TODO: Have this be auto-generated.
|
||||
"SpecialFiles.h"
|
||||
"StdString.h" # TODO: Remove the need for this file, transition to std::string.
|
||||
"StepMania.h" # TODO: Refactor into separate main project.
|
||||
)
|
||||
"generated/config.hpp"
|
||||
"GameLoop.h"
|
||||
"global.h"
|
||||
"ProductInfo.h" # TODO: Have this be auto-generated.
|
||||
"SpecialFiles.h"
|
||||
"StdString.h" # TODO: Remove the need for this file, transition to
|
||||
# std::string.
|
||||
"StepMania.h" # TODO: Refactor into separate main project.
|
||||
)
|
||||
|
||||
source_group("Global Files" FILES ${SMDATA_GLOBAL_FILES_SRC} ${SMDATA_GLOBAL_FILES_HPP})
|
||||
source_group("Global Files"
|
||||
FILES
|
||||
${SMDATA_GLOBAL_FILES_SRC}
|
||||
${SMDATA_GLOBAL_FILES_HPP})
|
||||
|
||||
+25
-18
@@ -3,35 +3,42 @@ if(NOT GTK2_FOUND)
|
||||
endif()
|
||||
|
||||
add_library("GtkModule"
|
||||
SHARED
|
||||
"arch/LoadingWindow/LoadingWindow_GtkModule.cpp"
|
||||
"arch/LoadingWindow/LoadingWindow_GtkModule.h"
|
||||
)
|
||||
SHARED
|
||||
"arch/LoadingWindow/LoadingWindow_GtkModule.cpp"
|
||||
"arch/LoadingWindow/LoadingWindow_GtkModule.h")
|
||||
|
||||
sm_add_compile_flag("GtkModule" "-std=${SM_CPP_STANDARD}")
|
||||
if (CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
sm_add_compile_flag("GtkModule" "-stdlib=libc++")
|
||||
set_target_properties("GtkModule" PROPERTIES LINK_FLAGS "-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# It is normally not appropriate to set the prefix to the empty string.
|
||||
# This is to maintain compatibility with the current source.
|
||||
# At some point, it may be worth being more flexible.
|
||||
# It is normally not appropriate to set the prefix to the empty string. This is
|
||||
# to maintain compatibility with the current source. At some point, it may be
|
||||
# worth being more flexible.
|
||||
set_target_properties("GtkModule" PROPERTIES PREFIX "")
|
||||
set_target_properties("GtkModule" PROPERTIES OUTPUT_NAME "GtkModule")
|
||||
set_target_properties("GtkModule" PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule" PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule" PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule" PROPERTIES LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule" PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule"
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule"
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE
|
||||
"${SM_ROOT_DIR}")
|
||||
set_target_properties(
|
||||
"GtkModule"
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule"
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL
|
||||
"${SM_ROOT_DIR}")
|
||||
set_target_properties("GtkModule"
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO
|
||||
"${SM_ROOT_DIR}")
|
||||
target_link_libraries("GtkModule" ${GTK2_LIBRARIES})
|
||||
set_property(TARGET "GtkModule" PROPERTY FOLDER "Internal Libraries")
|
||||
list(APPEND SM_GTK_INCLUDE_DIRS
|
||||
"${SM_SRC_DIR}"
|
||||
"${SM_SRC_DIR}/generated"
|
||||
"${SM_SRC_DIR}/arch/LoadingWindow"
|
||||
"${GTK2_INCLUDE_DIRS}"
|
||||
)
|
||||
"${SM_SRC_DIR}"
|
||||
"${SM_SRC_DIR}/generated"
|
||||
"${SM_SRC_DIR}/arch/LoadingWindow"
|
||||
"${GTK2_INCLUDE_DIRS}")
|
||||
|
||||
sm_add_compile_definition("GtkModule" CMAKE_POWERED)
|
||||
|
||||
|
||||
+110
-129
@@ -1,155 +1,136 @@
|
||||
if(APPLE)
|
||||
list(APPEND SMDATA_OS_DARWIN_SRC
|
||||
"archutils/Darwin/Crash.cpp"
|
||||
"archutils/Darwin/DarwinThreadHelpers.cpp"
|
||||
"archutils/Darwin/HIDDevice.cpp"
|
||||
"archutils/Darwin/JoystickDevice.cpp"
|
||||
"archutils/Darwin/KeyboardDevice.cpp"
|
||||
"archutils/Darwin/MouseDevice.cpp"
|
||||
"archutils/Darwin/PumpDevice.cpp"
|
||||
"archutils/Darwin/SMMain.mm"
|
||||
"archutils/Darwin/SpecialDirs.cpp"
|
||||
"archutils/Darwin/VectorHelper.cpp"
|
||||
)
|
||||
"archutils/Darwin/Crash.cpp"
|
||||
"archutils/Darwin/DarwinThreadHelpers.cpp"
|
||||
"archutils/Darwin/HIDDevice.cpp"
|
||||
"archutils/Darwin/JoystickDevice.cpp"
|
||||
"archutils/Darwin/KeyboardDevice.cpp"
|
||||
"archutils/Darwin/MouseDevice.cpp"
|
||||
"archutils/Darwin/PumpDevice.cpp"
|
||||
"archutils/Darwin/SMMain.mm"
|
||||
"archutils/Darwin/SpecialDirs.cpp"
|
||||
"archutils/Darwin/VectorHelper.cpp")
|
||||
list(APPEND SMDATA_OS_DARWIN_HPP
|
||||
"archutils/Darwin/arch_setup.h"
|
||||
"archutils/Darwin/Crash.h"
|
||||
"archutils/Darwin/DarwinThreadHelpers.h"
|
||||
"archutils/Darwin/HIDDevice.h"
|
||||
"archutils/Darwin/JoystickDevice.h"
|
||||
"archutils/Darwin/KeyboardDevice.h"
|
||||
"archutils/Darwin/MouseDevice.h"
|
||||
"archutils/Darwin/PumpDevice.h"
|
||||
"archutils/Darwin/SpecialDirs.h"
|
||||
"archutils/Darwin/StepMania.pch" # precompiled header.
|
||||
"archutils/Darwin/VectorHelper.h"
|
||||
)
|
||||
|
||||
source_group("OS Specific\\\\Darwin" FILES ${SMDATA_OS_DARWIN_SRC} ${SMDATA_OS_DARWIN_HPP})
|
||||
"archutils/Darwin/arch_setup.h"
|
||||
"archutils/Darwin/Crash.h"
|
||||
"archutils/Darwin/DarwinThreadHelpers.h"
|
||||
"archutils/Darwin/HIDDevice.h"
|
||||
"archutils/Darwin/JoystickDevice.h"
|
||||
"archutils/Darwin/KeyboardDevice.h"
|
||||
"archutils/Darwin/MouseDevice.h"
|
||||
"archutils/Darwin/PumpDevice.h"
|
||||
"archutils/Darwin/SpecialDirs.h"
|
||||
"archutils/Darwin/StepMania.pch" # precompiled header.
|
||||
"archutils/Darwin/VectorHelper.h")
|
||||
|
||||
|
||||
list(APPEND SMDATA_OS_SRC
|
||||
${SMDATA_OS_DARWIN_SRC}
|
||||
)
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
${SMDATA_OS_DARWIN_HPP}
|
||||
)
|
||||
source_group("OS Specific\\\\Darwin"
|
||||
FILES
|
||||
${SMDATA_OS_DARWIN_SRC}
|
||||
${SMDATA_OS_DARWIN_HPP})
|
||||
|
||||
list(APPEND SMDATA_OS_SRC ${SMDATA_OS_DARWIN_SRC})
|
||||
list(APPEND SMDATA_OS_HPP ${SMDATA_OS_DARWIN_HPP})
|
||||
else()
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_OS_SRC
|
||||
"archutils/Win32/AppInstance.cpp"
|
||||
"archutils/Win32/arch_setup.cpp"
|
||||
"archutils/Win32/arch_time.cpp"
|
||||
"archutils/Win32/CommandLine.cpp"
|
||||
"archutils/Win32/Crash.cpp"
|
||||
"archutils/Win32/CrashHandlerChild.cpp"
|
||||
"archutils/Win32/CrashHandlerNetworking.cpp"
|
||||
"archutils/Win32/DebugInfoHunt.cpp"
|
||||
"archutils/Win32/DialogUtil.cpp"
|
||||
"archutils/Win32/DirectXHelpers.cpp"
|
||||
"archutils/Win32/ErrorStrings.cpp"
|
||||
"archutils/Win32/GetFileInformation.cpp"
|
||||
"archutils/Win32/GotoURL.cpp"
|
||||
"archutils/Win32/GraphicsWindow.cpp"
|
||||
"archutils/Win32/MessageWindow.cpp"
|
||||
"archutils/Win32/RegistryAccess.cpp"
|
||||
"archutils/Win32/RestartProgram.cpp"
|
||||
"archutils/Win32/SpecialDirs.cpp"
|
||||
"archutils/Win32/USB.cpp"
|
||||
"archutils/Win32/VideoDriverInfo.cpp"
|
||||
"archutils/Win32/WindowIcon.cpp"
|
||||
"archutils/Win32/WindowsDialogBox.cpp"
|
||||
"archutils/Win32/WindowsResources.rc"
|
||||
)
|
||||
"archutils/Win32/AppInstance.cpp"
|
||||
"archutils/Win32/arch_setup.cpp"
|
||||
"archutils/Win32/arch_time.cpp"
|
||||
"archutils/Win32/CommandLine.cpp"
|
||||
"archutils/Win32/Crash.cpp"
|
||||
"archutils/Win32/CrashHandlerChild.cpp"
|
||||
"archutils/Win32/CrashHandlerNetworking.cpp"
|
||||
"archutils/Win32/DebugInfoHunt.cpp"
|
||||
"archutils/Win32/DialogUtil.cpp"
|
||||
"archutils/Win32/DirectXHelpers.cpp"
|
||||
"archutils/Win32/ErrorStrings.cpp"
|
||||
"archutils/Win32/GetFileInformation.cpp"
|
||||
"archutils/Win32/GotoURL.cpp"
|
||||
"archutils/Win32/GraphicsWindow.cpp"
|
||||
"archutils/Win32/MessageWindow.cpp"
|
||||
"archutils/Win32/RegistryAccess.cpp"
|
||||
"archutils/Win32/RestartProgram.cpp"
|
||||
"archutils/Win32/SpecialDirs.cpp"
|
||||
"archutils/Win32/USB.cpp"
|
||||
"archutils/Win32/VideoDriverInfo.cpp"
|
||||
"archutils/Win32/WindowIcon.cpp"
|
||||
"archutils/Win32/WindowsDialogBox.cpp"
|
||||
"archutils/Win32/WindowsResources.rc")
|
||||
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
"archutils/Win32/AppInstance.h"
|
||||
"archutils/Win32/arch_setup.h"
|
||||
"archutils/Win32/CommandLine.h"
|
||||
"archutils/Win32/Crash.h"
|
||||
"archutils/Win32/CrashHandlerInternal.h"
|
||||
"archutils/Win32/CrashHandlerNetworking.h"
|
||||
"archutils/Win32/DebugInfoHunt.h"
|
||||
"archutils/Win32/DialogUtil.h"
|
||||
"archutils/Win32/DirectXHelpers.h"
|
||||
"archutils/Win32/ErrorStrings.h"
|
||||
"archutils/Win32/GetFileInformation.h"
|
||||
"archutils/Win32/GotoURL.h"
|
||||
"archutils/Win32/GraphicsWindow.h"
|
||||
"archutils/Win32/MessageWindow.h"
|
||||
"archutils/Win32/RegistryAccess.h"
|
||||
"archutils/Win32/RestartProgram.h"
|
||||
"archutils/Win32/SpecialDirs.h"
|
||||
"archutils/Win32/USB.h"
|
||||
"archutils/Win32/VideoDriverInfo.h"
|
||||
"archutils/Win32/WindowIcon.h"
|
||||
"archutils/Win32/WindowsDialogBox.h"
|
||||
"archutils/Win32/WindowsResources.h"
|
||||
)
|
||||
"archutils/Win32/AppInstance.h"
|
||||
"archutils/Win32/arch_setup.h"
|
||||
"archutils/Win32/CommandLine.h"
|
||||
"archutils/Win32/Crash.h"
|
||||
"archutils/Win32/CrashHandlerInternal.h"
|
||||
"archutils/Win32/CrashHandlerNetworking.h"
|
||||
"archutils/Win32/DebugInfoHunt.h"
|
||||
"archutils/Win32/DialogUtil.h"
|
||||
"archutils/Win32/DirectXHelpers.h"
|
||||
"archutils/Win32/ErrorStrings.h"
|
||||
"archutils/Win32/GetFileInformation.h"
|
||||
"archutils/Win32/GotoURL.h"
|
||||
"archutils/Win32/GraphicsWindow.h"
|
||||
"archutils/Win32/MessageWindow.h"
|
||||
"archutils/Win32/RegistryAccess.h"
|
||||
"archutils/Win32/RestartProgram.h"
|
||||
"archutils/Win32/SpecialDirs.h"
|
||||
"archutils/Win32/USB.h"
|
||||
"archutils/Win32/VideoDriverInfo.h"
|
||||
"archutils/Win32/WindowIcon.h"
|
||||
"archutils/Win32/WindowsDialogBox.h"
|
||||
"archutils/Win32/WindowsResources.h")
|
||||
else() # Unix
|
||||
list(APPEND SMDATA_OS_SRC # TODO: X11 check, crash handler check
|
||||
"archutils/Unix/AssertionHandler.cpp"
|
||||
"archutils/Unix/EmergencyShutdown.cpp"
|
||||
"archutils/Unix/GetSysInfo.cpp"
|
||||
"archutils/Unix/RunningUnderValgrind.cpp"
|
||||
"archutils/Unix/SignalHandler.cpp"
|
||||
"archutils/Unix/SpecialDirs.cpp"
|
||||
"archutils/Unix/StackCheck.cpp"
|
||||
)
|
||||
"archutils/Unix/AssertionHandler.cpp"
|
||||
"archutils/Unix/EmergencyShutdown.cpp"
|
||||
"archutils/Unix/GetSysInfo.cpp"
|
||||
"archutils/Unix/RunningUnderValgrind.cpp"
|
||||
"archutils/Unix/SignalHandler.cpp"
|
||||
"archutils/Unix/SpecialDirs.cpp"
|
||||
"archutils/Unix/StackCheck.cpp")
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
"archutils/Unix/arch_setup.h"
|
||||
"archutils/Unix/AssertionHandler.h"
|
||||
"archutils/Unix/EmergencyShutdown.h"
|
||||
"archutils/Unix/GetSysInfo.h"
|
||||
"archutils/Unix/RunningUnderValgrind.h"
|
||||
"archutils/Unix/SignalHandler.h"
|
||||
"archutils/Unix/SpecialDirs.h"
|
||||
"archutils/Common/gcc_byte_swaps.h"
|
||||
)
|
||||
"archutils/Unix/arch_setup.h"
|
||||
"archutils/Unix/AssertionHandler.h"
|
||||
"archutils/Unix/EmergencyShutdown.h"
|
||||
"archutils/Unix/GetSysInfo.h"
|
||||
"archutils/Unix/RunningUnderValgrind.h"
|
||||
"archutils/Unix/SignalHandler.h"
|
||||
"archutils/Unix/SpecialDirs.h"
|
||||
"archutils/Common/gcc_byte_swaps.h")
|
||||
if(X11_FOUND)
|
||||
list(APPEND SMDATA_OS_SRC
|
||||
"archutils/Unix/X11Helper.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
"archutils/Unix/X11Helper.h"
|
||||
)
|
||||
list(APPEND SMDATA_OS_SRC "archutils/Unix/X11Helper.cpp")
|
||||
list(APPEND SMDATA_OS_HPP "archutils/Unix/X11Helper.h")
|
||||
endif()
|
||||
if(HAS_PTHREAD)
|
||||
list(APPEND SMDATA_OS_SRC
|
||||
"archutils/Common/PthreadHelpers.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
"archutils/Common/PthreadHelpers.h"
|
||||
)
|
||||
list(APPEND SMDATA_OS_SRC "archutils/Common/PthreadHelpers.cpp")
|
||||
list(APPEND SMDATA_OS_HPP "archutils/Common/PthreadHelpers.h")
|
||||
endif()
|
||||
endif()
|
||||
source_group("OS Specific" FILES ${SMDATA_OS_SRC} ${SMDATA_OS_HPP})
|
||||
endif()
|
||||
|
||||
if(APPLE OR LINUX)
|
||||
if (WITH_CRASH_HANDLER)
|
||||
if(WITH_CRASH_HANDLER)
|
||||
list(APPEND SMDATA_OS_UNIX_CRASH_SRC
|
||||
"archutils/Unix/Backtrace.cpp"
|
||||
"archutils/Unix/BacktraceNames.cpp"
|
||||
"archutils/Unix/CrashHandler.cpp"
|
||||
"archutils/Unix/CrashHandlerChild.cpp"
|
||||
"archutils/Unix/CrashHandlerInternal.cpp"
|
||||
"archutils/Unix/SignalHandler.cpp"
|
||||
)
|
||||
"archutils/Unix/Backtrace.cpp"
|
||||
"archutils/Unix/BacktraceNames.cpp"
|
||||
"archutils/Unix/CrashHandler.cpp"
|
||||
"archutils/Unix/CrashHandlerChild.cpp"
|
||||
"archutils/Unix/CrashHandlerInternal.cpp"
|
||||
"archutils/Unix/SignalHandler.cpp")
|
||||
list(APPEND SMDATA_OS_UNIX_CRASH_HPP
|
||||
"archutils/Unix/Backtrace.h"
|
||||
"archutils/Unix/BacktraceNames.h"
|
||||
"archutils/Unix/CrashHandler.h"
|
||||
"archutils/Unix/CrashHandlerInternal.h"
|
||||
"archutils/Unix/SignalHandler.h"
|
||||
)
|
||||
source_group("OS Specific\\\\Unix" FILES ${SMDATA_OS_UNIX_CRASH_SRC} ${SMDATA_OS_UNIX_CRASH_HPP})
|
||||
"archutils/Unix/Backtrace.h"
|
||||
"archutils/Unix/BacktraceNames.h"
|
||||
"archutils/Unix/CrashHandler.h"
|
||||
"archutils/Unix/CrashHandlerInternal.h"
|
||||
"archutils/Unix/SignalHandler.h")
|
||||
source_group("OS Specific\\\\Unix"
|
||||
FILES
|
||||
${SMDATA_OS_UNIX_CRASH_SRC}
|
||||
${SMDATA_OS_UNIX_CRASH_HPP})
|
||||
|
||||
list(APPEND SMDATA_OS_SRC
|
||||
${SMDATA_OS_UNIX_CRASH_SRC}
|
||||
)
|
||||
list(APPEND SMDATA_OS_HPP
|
||||
${SMDATA_OS_UNIX_CRASH_HPP}
|
||||
)
|
||||
list(APPEND SMDATA_OS_SRC ${SMDATA_OS_UNIX_CRASH_SRC})
|
||||
list(APPEND SMDATA_OS_HPP ${SMDATA_OS_UNIX_CRASH_HPP})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+179
-175
@@ -1,220 +1,224 @@
|
||||
# TODO: Turn Rage into a libary.
|
||||
|
||||
list(APPEND SMDATA_RAGE_UTILS_SRC
|
||||
"RageUtil.cpp"
|
||||
"RageUtil_BackgroundLoader.cpp"
|
||||
"RageUtil_CachedObject.cpp"
|
||||
"RageUtil_CharConversions.cpp"
|
||||
"RageUtil_FileDB.cpp"
|
||||
"RageUtil_WorkerThread.cpp"
|
||||
)
|
||||
"RageUtil.cpp"
|
||||
"RageUtil_BackgroundLoader.cpp"
|
||||
"RageUtil_CachedObject.cpp"
|
||||
"RageUtil_CharConversions.cpp"
|
||||
"RageUtil_FileDB.cpp"
|
||||
"RageUtil_WorkerThread.cpp")
|
||||
|
||||
list(APPEND SMDATA_RAGE_UTILS_HPP
|
||||
"RageUtil.h"
|
||||
"RageUtil_AutoPtr.h" # TODO: Remove the need for this and replace with c++11 smart pointers
|
||||
"RageUtil_BackgroundLoader.h"
|
||||
"RageUtil_CachedObject.h"
|
||||
"RageUtil_CharConversions.h"
|
||||
"RageUtil_CircularBuffer.h"
|
||||
"RageUtil_FileDB.h"
|
||||
"RageUtil_WorkerThread.h"
|
||||
)
|
||||
"RageUtil.h"
|
||||
"RageUtil_AutoPtr.h" # TODO: Remove the need for this and replace
|
||||
# with c++11 smart pointers
|
||||
"RageUtil_BackgroundLoader.h"
|
||||
"RageUtil_CachedObject.h"
|
||||
"RageUtil_CharConversions.h"
|
||||
"RageUtil_CircularBuffer.h"
|
||||
"RageUtil_FileDB.h"
|
||||
"RageUtil_WorkerThread.h")
|
||||
|
||||
source_group("Rage\\\\Utils" FILES ${SMDATA_RAGE_UTILS_SRC} ${SMDATA_RAGE_UTILS_HPP})
|
||||
source_group("Rage\\\\Utils"
|
||||
FILES
|
||||
${SMDATA_RAGE_UTILS_SRC}
|
||||
${SMDATA_RAGE_UTILS_HPP})
|
||||
|
||||
list(APPEND SMDATA_RAGE_MISC_SRC
|
||||
"RageException.cpp"
|
||||
"RageInput.cpp"
|
||||
"RageInputDevice.cpp"
|
||||
"RageLog.cpp"
|
||||
"RageMath.cpp"
|
||||
"RageTypes.cpp"
|
||||
"RageThreads.cpp"
|
||||
"RageTimer.cpp"
|
||||
)
|
||||
"RageException.cpp"
|
||||
"RageInput.cpp"
|
||||
"RageInputDevice.cpp"
|
||||
"RageLog.cpp"
|
||||
"RageMath.cpp"
|
||||
"RageTypes.cpp"
|
||||
"RageThreads.cpp"
|
||||
"RageTimer.cpp")
|
||||
|
||||
list(APPEND SMDATA_RAGE_MISC_HPP
|
||||
"RageException.h"
|
||||
"RageInput.h"
|
||||
"RageInputDevice.h"
|
||||
"RageLog.h"
|
||||
"RageMath.h"
|
||||
"RageTypes.h"
|
||||
"RageThreads.h"
|
||||
"RageTimer.h"
|
||||
)
|
||||
"RageException.h"
|
||||
"RageInput.h"
|
||||
"RageInputDevice.h"
|
||||
"RageLog.h"
|
||||
"RageMath.h"
|
||||
"RageTypes.h"
|
||||
"RageThreads.h"
|
||||
"RageTimer.h")
|
||||
|
||||
source_group("Rage\\\\Misc" FILES ${SMDATA_RAGE_MISC_SRC} ${SMDATA_RAGE_MISC_HPP})
|
||||
source_group("Rage\\\\Misc"
|
||||
FILES
|
||||
${SMDATA_RAGE_MISC_SRC}
|
||||
${SMDATA_RAGE_MISC_HPP})
|
||||
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_SRC
|
||||
"RageBitmapTexture.cpp"
|
||||
"RageDisplay.cpp"
|
||||
"RageDisplay_Null.cpp"
|
||||
"RageDisplay_OGL.cpp"
|
||||
"RageDisplay_OGL_Helpers.cpp"
|
||||
"RageModelGeometry.cpp"
|
||||
"RageSurface.cpp"
|
||||
"RageSurface_Load.cpp"
|
||||
"RageSurface_Load_BMP.cpp"
|
||||
"RageSurface_Load_GIF.cpp"
|
||||
"RageSurface_Load_JPEG.cpp"
|
||||
"RageSurface_Load_PNG.cpp"
|
||||
"RageSurface_Load_XPM.cpp"
|
||||
"RageSurface_Save_BMP.cpp"
|
||||
"RageSurface_Save_JPEG.cpp"
|
||||
"RageSurface_Save_PNG.cpp"
|
||||
"RageSurfaceUtils.cpp"
|
||||
"RageSurfaceUtils_Dither.cpp"
|
||||
"RageSurfaceUtils_Palettize.cpp"
|
||||
"RageSurfaceUtils_Zoom.cpp"
|
||||
"RageTexture.cpp"
|
||||
"RageTextureID.cpp"
|
||||
"RageTextureManager.cpp"
|
||||
"RageTexturePreloader.cpp"
|
||||
"RageTextureRenderTarget.cpp"
|
||||
)
|
||||
"RageBitmapTexture.cpp"
|
||||
"RageDisplay.cpp"
|
||||
"RageDisplay_Null.cpp"
|
||||
"RageDisplay_OGL.cpp"
|
||||
"RageDisplay_OGL_Helpers.cpp"
|
||||
"RageModelGeometry.cpp"
|
||||
"RageSurface.cpp"
|
||||
"RageSurface_Load.cpp"
|
||||
"RageSurface_Load_BMP.cpp"
|
||||
"RageSurface_Load_GIF.cpp"
|
||||
"RageSurface_Load_JPEG.cpp"
|
||||
"RageSurface_Load_PNG.cpp"
|
||||
"RageSurface_Load_XPM.cpp"
|
||||
"RageSurface_Save_BMP.cpp"
|
||||
"RageSurface_Save_JPEG.cpp"
|
||||
"RageSurface_Save_PNG.cpp"
|
||||
"RageSurfaceUtils.cpp"
|
||||
"RageSurfaceUtils_Dither.cpp"
|
||||
"RageSurfaceUtils_Palettize.cpp"
|
||||
"RageSurfaceUtils_Zoom.cpp"
|
||||
"RageTexture.cpp"
|
||||
"RageTextureID.cpp"
|
||||
"RageTextureManager.cpp"
|
||||
"RageTexturePreloader.cpp"
|
||||
"RageTextureRenderTarget.cpp")
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_HPP
|
||||
"RageBitmapTexture.h"
|
||||
"RageDisplay.h"
|
||||
"RageDisplay_Null.h"
|
||||
"RageDisplay_OGL.h"
|
||||
"RageDisplay_OGL_Helpers.h"
|
||||
"RageModelGeometry.h"
|
||||
"RageSurface.h"
|
||||
"RageSurface_Load.h"
|
||||
"RageSurface_Load_BMP.h"
|
||||
"RageSurface_Load_GIF.h"
|
||||
"RageSurface_Load_JPEG.h"
|
||||
"RageSurface_Load_PNG.h"
|
||||
"RageSurface_Load_XPM.h"
|
||||
"RageSurface_Save_BMP.h"
|
||||
"RageSurface_Save_JPEG.h"
|
||||
"RageSurface_Save_PNG.h"
|
||||
"RageSurfaceUtils.h"
|
||||
"RageSurfaceUtils_Dither.h"
|
||||
"RageSurfaceUtils_Palettize.h"
|
||||
"RageSurfaceUtils_Zoom.h"
|
||||
"RageTexture.h"
|
||||
"RageTextureID.h"
|
||||
"RageTextureManager.h"
|
||||
"RageTexturePreloader.h"
|
||||
"RageTextureRenderTarget.h"
|
||||
)
|
||||
"RageBitmapTexture.h"
|
||||
"RageDisplay.h"
|
||||
"RageDisplay_Null.h"
|
||||
"RageDisplay_OGL.h"
|
||||
"RageDisplay_OGL_Helpers.h"
|
||||
"RageModelGeometry.h"
|
||||
"RageSurface.h"
|
||||
"RageSurface_Load.h"
|
||||
"RageSurface_Load_BMP.h"
|
||||
"RageSurface_Load_GIF.h"
|
||||
"RageSurface_Load_JPEG.h"
|
||||
"RageSurface_Load_PNG.h"
|
||||
"RageSurface_Load_XPM.h"
|
||||
"RageSurface_Save_BMP.h"
|
||||
"RageSurface_Save_JPEG.h"
|
||||
"RageSurface_Save_PNG.h"
|
||||
"RageSurfaceUtils.h"
|
||||
"RageSurfaceUtils_Dither.h"
|
||||
"RageSurfaceUtils_Palettize.h"
|
||||
"RageSurfaceUtils_Zoom.h"
|
||||
"RageTexture.h"
|
||||
"RageTextureID.h"
|
||||
"RageTextureManager.h"
|
||||
"RageTexturePreloader.h"
|
||||
"RageTextureRenderTarget.h")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_SRC "RageDisplay_D3D.cpp")
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_HPP "RageDisplay_D3D.h")
|
||||
elseif(LINUX)
|
||||
if (WITH_GLES2)
|
||||
if(WITH_GLES2)
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_SRC "RageDisplay_GLES2.cpp")
|
||||
list(APPEND SMDATA_RAGE_GRAPHICS_HPP "RageDisplay_GLES2.h")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
source_group("Rage\\\\Graphics" FILES ${SMDATA_RAGE_GRAPHICS_SRC} ${SMDATA_RAGE_GRAPHICS_HPP})
|
||||
source_group("Rage\\\\Graphics"
|
||||
FILES
|
||||
${SMDATA_RAGE_GRAPHICS_SRC}
|
||||
${SMDATA_RAGE_GRAPHICS_HPP})
|
||||
|
||||
list(APPEND SMDATA_RAGE_FILE_SRC
|
||||
"RageFile.cpp"
|
||||
"RageFileBasic.cpp"
|
||||
"RageFileDriver.cpp"
|
||||
"RageFileDriverDeflate.cpp"
|
||||
"RageFileDriverDirect.cpp"
|
||||
"RageFileDriverDirectHelpers.cpp"
|
||||
"RageFileDriverMemory.cpp"
|
||||
"RageFileDriverReadAhead.cpp"
|
||||
"RageFileDriverSlice.cpp"
|
||||
"RageFileDriverTimeout.cpp"
|
||||
"RageFileDriverZip.cpp"
|
||||
"RageFileManager.cpp"
|
||||
"RageFileManager_ReadAhead.cpp"
|
||||
)
|
||||
"RageFile.cpp"
|
||||
"RageFileBasic.cpp"
|
||||
"RageFileDriver.cpp"
|
||||
"RageFileDriverDeflate.cpp"
|
||||
"RageFileDriverDirect.cpp"
|
||||
"RageFileDriverDirectHelpers.cpp"
|
||||
"RageFileDriverMemory.cpp"
|
||||
"RageFileDriverReadAhead.cpp"
|
||||
"RageFileDriverSlice.cpp"
|
||||
"RageFileDriverTimeout.cpp"
|
||||
"RageFileDriverZip.cpp"
|
||||
"RageFileManager.cpp"
|
||||
"RageFileManager_ReadAhead.cpp")
|
||||
|
||||
list(APPEND SMDATA_RAGE_FILE_HPP
|
||||
"RageFile.h"
|
||||
"RageFileBasic.h"
|
||||
"RageFileDriver.h"
|
||||
"RageFileDriverDeflate.h"
|
||||
"RageFileDriverDirect.h"
|
||||
"RageFileDriverDirectHelpers.h"
|
||||
"RageFileDriverMemory.h"
|
||||
"RageFileDriverReadAhead.h"
|
||||
"RageFileDriverSlice.h"
|
||||
"RageFileDriverTimeout.h"
|
||||
"RageFileDriverZip.h"
|
||||
"RageFileManager.h"
|
||||
"RageFileManager_ReadAhead.h"
|
||||
)
|
||||
"RageFile.h"
|
||||
"RageFileBasic.h"
|
||||
"RageFileDriver.h"
|
||||
"RageFileDriverDeflate.h"
|
||||
"RageFileDriverDirect.h"
|
||||
"RageFileDriverDirectHelpers.h"
|
||||
"RageFileDriverMemory.h"
|
||||
"RageFileDriverReadAhead.h"
|
||||
"RageFileDriverSlice.h"
|
||||
"RageFileDriverTimeout.h"
|
||||
"RageFileDriverZip.h"
|
||||
"RageFileManager.h"
|
||||
"RageFileManager_ReadAhead.h")
|
||||
|
||||
source_group("Rage\\\\File" FILES ${SMDATA_RAGE_FILE_SRC} ${SMDATA_RAGE_FILE_HPP})
|
||||
source_group("Rage\\\\File"
|
||||
FILES
|
||||
${SMDATA_RAGE_FILE_SRC}
|
||||
${SMDATA_RAGE_FILE_HPP})
|
||||
|
||||
list(APPEND SMDATA_RAGE_SOUND_SRC
|
||||
"RageSound.cpp"
|
||||
"RageSoundManager.cpp"
|
||||
"RageSoundMixBuffer.cpp"
|
||||
"RageSoundPosMap.cpp"
|
||||
"RageSoundReader.cpp"
|
||||
"RageSoundReader_Chain.cpp"
|
||||
"RageSoundReader_ChannelSplit.cpp"
|
||||
"RageSoundReader_Extend.cpp"
|
||||
"RageSoundReader_FileReader.cpp"
|
||||
"RageSoundReader_Merge.cpp"
|
||||
"RageSoundReader_Pan.cpp"
|
||||
"RageSoundReader_PitchChange.cpp"
|
||||
"RageSoundReader_PostBuffering.cpp"
|
||||
"RageSoundReader_Preload.cpp"
|
||||
"RageSoundReader_Resample_Good.cpp"
|
||||
"RageSoundReader_SpeedChange.cpp"
|
||||
"RageSoundReader_ThreadedBuffer.cpp"
|
||||
"RageSoundReader_WAV.cpp"
|
||||
"RageSoundUtil.cpp"
|
||||
)
|
||||
"RageSound.cpp"
|
||||
"RageSoundManager.cpp"
|
||||
"RageSoundMixBuffer.cpp"
|
||||
"RageSoundPosMap.cpp"
|
||||
"RageSoundReader.cpp"
|
||||
"RageSoundReader_Chain.cpp"
|
||||
"RageSoundReader_ChannelSplit.cpp"
|
||||
"RageSoundReader_Extend.cpp"
|
||||
"RageSoundReader_FileReader.cpp"
|
||||
"RageSoundReader_Merge.cpp"
|
||||
"RageSoundReader_Pan.cpp"
|
||||
"RageSoundReader_PitchChange.cpp"
|
||||
"RageSoundReader_PostBuffering.cpp"
|
||||
"RageSoundReader_Preload.cpp"
|
||||
"RageSoundReader_Resample_Good.cpp"
|
||||
"RageSoundReader_SpeedChange.cpp"
|
||||
"RageSoundReader_ThreadedBuffer.cpp"
|
||||
"RageSoundReader_WAV.cpp"
|
||||
"RageSoundUtil.cpp")
|
||||
list(APPEND SMDATA_RAGE_SOUND_HPP
|
||||
"RageSound.h"
|
||||
"RageSoundManager.h"
|
||||
"RageSoundMixBuffer.h"
|
||||
"RageSoundPosMap.h"
|
||||
"RageSoundReader.h"
|
||||
"RageSoundReader_Chain.h"
|
||||
"RageSoundReader_ChannelSplit.h"
|
||||
"RageSoundReader_Extend.h"
|
||||
"RageSoundReader_FileReader.h"
|
||||
"RageSoundReader_Filter.h"
|
||||
"RageSoundReader_Merge.h"
|
||||
"RageSoundReader_Pan.h"
|
||||
"RageSoundReader_PitchChange.h"
|
||||
"RageSoundReader_PostBuffering.h"
|
||||
"RageSoundReader_Preload.h"
|
||||
"RageSoundReader_Resample_Good.h"
|
||||
"RageSoundReader_SpeedChange.h"
|
||||
"RageSoundReader_ThreadedBuffer.h"
|
||||
"RageSoundReader_WAV.h"
|
||||
"RageSoundUtil.h"
|
||||
)
|
||||
"RageSound.h"
|
||||
"RageSoundManager.h"
|
||||
"RageSoundMixBuffer.h"
|
||||
"RageSoundPosMap.h"
|
||||
"RageSoundReader.h"
|
||||
"RageSoundReader_Chain.h"
|
||||
"RageSoundReader_ChannelSplit.h"
|
||||
"RageSoundReader_Extend.h"
|
||||
"RageSoundReader_FileReader.h"
|
||||
"RageSoundReader_Filter.h"
|
||||
"RageSoundReader_Merge.h"
|
||||
"RageSoundReader_Pan.h"
|
||||
"RageSoundReader_PitchChange.h"
|
||||
"RageSoundReader_PostBuffering.h"
|
||||
"RageSoundReader_Preload.h"
|
||||
"RageSoundReader_Resample_Good.h"
|
||||
"RageSoundReader_SpeedChange.h"
|
||||
"RageSoundReader_ThreadedBuffer.h"
|
||||
"RageSoundReader_WAV.h"
|
||||
"RageSoundUtil.h")
|
||||
|
||||
if (HAS_OGG)
|
||||
if(HAS_OGG)
|
||||
list(APPEND SMDATA_RAGE_SOUND_SRC "RageSoundReader_Vorbisfile.cpp")
|
||||
list(APPEND SMDATA_RAGE_SOUND_HPP "RageSoundReader_Vorbisfile.h")
|
||||
endif()
|
||||
|
||||
if (HAS_MP3)
|
||||
if(HAS_MP3)
|
||||
list(APPEND SMDATA_RAGE_SOUND_SRC "RageSoundReader_MP3.cpp")
|
||||
list(APPEND SMDATA_RAGE_SOUND_HPP "RageSoundReader_MP3.h")
|
||||
endif()
|
||||
|
||||
source_group("Rage\\\\Sound" FILES ${SMDATA_RAGE_SOUND_SRC} ${SMDATA_RAGE_SOUND_HPP})
|
||||
source_group("Rage\\\\Sound"
|
||||
FILES
|
||||
${SMDATA_RAGE_SOUND_SRC}
|
||||
${SMDATA_RAGE_SOUND_HPP})
|
||||
|
||||
list(APPEND SMDATA_ALL_RAGE_SRC
|
||||
${SMDATA_RAGE_FILE_SRC}
|
||||
${SMDATA_RAGE_GRAPHICS_SRC}
|
||||
${SMDATA_RAGE_MISC_SRC}
|
||||
${SMDATA_RAGE_SOUND_SRC}
|
||||
${SMDATA_RAGE_UTILS_SRC}
|
||||
)
|
||||
${SMDATA_RAGE_FILE_SRC}
|
||||
${SMDATA_RAGE_GRAPHICS_SRC}
|
||||
${SMDATA_RAGE_MISC_SRC}
|
||||
${SMDATA_RAGE_SOUND_SRC}
|
||||
${SMDATA_RAGE_UTILS_SRC})
|
||||
|
||||
list(APPEND SMDATA_ALL_RAGE_HPP
|
||||
${SMDATA_RAGE_FILE_HPP}
|
||||
${SMDATA_RAGE_GRAPHICS_HPP}
|
||||
${SMDATA_RAGE_MISC_HPP}
|
||||
${SMDATA_RAGE_SOUND_HPP}
|
||||
${SMDATA_RAGE_UTILS_HPP}
|
||||
)
|
||||
${SMDATA_RAGE_FILE_HPP}
|
||||
${SMDATA_RAGE_GRAPHICS_HPP}
|
||||
${SMDATA_RAGE_MISC_HPP}
|
||||
${SMDATA_RAGE_SOUND_HPP}
|
||||
${SMDATA_RAGE_UTILS_HPP})
|
||||
|
||||
+174
-176
@@ -1,199 +1,197 @@
|
||||
list(APPEND SMDATA_SCREEN_GAMEPLAY_SRC
|
||||
"ScreenGameplay.cpp"
|
||||
"ScreenGameplayLesson.cpp"
|
||||
"ScreenGameplayNormal.cpp"
|
||||
"ScreenGameplayShared.cpp"
|
||||
"ScreenGameplaySyncMachine.cpp"
|
||||
)
|
||||
"ScreenGameplay.cpp"
|
||||
"ScreenGameplayLesson.cpp"
|
||||
"ScreenGameplayNormal.cpp"
|
||||
"ScreenGameplayShared.cpp"
|
||||
"ScreenGameplaySyncMachine.cpp")
|
||||
|
||||
list(APPEND SMDATA_SCREEN_GAMEPLAY_HPP
|
||||
"ScreenGameplay.h"
|
||||
"ScreenGameplayNormal.h"
|
||||
"ScreenGameplayShared.h"
|
||||
"ScreenGameplaySyncMachine.h"
|
||||
)
|
||||
"ScreenGameplay.h"
|
||||
"ScreenGameplayNormal.h"
|
||||
"ScreenGameplayShared.h"
|
||||
"ScreenGameplaySyncMachine.h")
|
||||
|
||||
source_group("Screens\\\\Gameplay" FILES ${SMDATA_SCREEN_GAMEPLAY_SRC} ${SMDATA_SCREEN_GAMEPLAY_HPP})
|
||||
source_group("Screens\\\\Gameplay"
|
||||
FILES
|
||||
${SMDATA_SCREEN_GAMEPLAY_SRC}
|
||||
${SMDATA_SCREEN_GAMEPLAY_HPP})
|
||||
|
||||
list(APPEND SMDATA_SCREEN_OPTION_SRC
|
||||
"ScreenOptions.cpp"
|
||||
"ScreenOptionsCourseOverview.cpp"
|
||||
"ScreenOptionsEditCourse.cpp"
|
||||
"ScreenOptionsEditProfile.cpp"
|
||||
"ScreenOptionsExportPackage.cpp"
|
||||
"ScreenOptionsManageCourses.cpp"
|
||||
"ScreenOptionsManageEditSteps.cpp"
|
||||
"ScreenOptionsManageProfiles.cpp"
|
||||
"ScreenOptionsMaster.cpp"
|
||||
"ScreenOptionsMasterPrefs.cpp"
|
||||
"ScreenOptionsMemoryCard.cpp"
|
||||
"ScreenOptionsToggleSongs.cpp"
|
||||
)
|
||||
"ScreenOptions.cpp"
|
||||
"ScreenOptionsCourseOverview.cpp"
|
||||
"ScreenOptionsEditCourse.cpp"
|
||||
"ScreenOptionsEditProfile.cpp"
|
||||
"ScreenOptionsExportPackage.cpp"
|
||||
"ScreenOptionsManageCourses.cpp"
|
||||
"ScreenOptionsManageEditSteps.cpp"
|
||||
"ScreenOptionsManageProfiles.cpp"
|
||||
"ScreenOptionsMaster.cpp"
|
||||
"ScreenOptionsMasterPrefs.cpp"
|
||||
"ScreenOptionsMemoryCard.cpp"
|
||||
"ScreenOptionsToggleSongs.cpp")
|
||||
list(APPEND SMDATA_SCREEN_OPTION_HPP
|
||||
"ScreenOptions.h"
|
||||
"ScreenOptionsCourseOverview.h"
|
||||
"ScreenOptionsEditCourse.h"
|
||||
"ScreenOptionsEditProfile.h"
|
||||
"ScreenOptionsExportPackage.h"
|
||||
"ScreenOptionsManageCourses.h"
|
||||
"ScreenOptionsManageEditSteps.h"
|
||||
"ScreenOptionsManageProfiles.h"
|
||||
"ScreenOptionsMaster.h"
|
||||
"ScreenOptionsMasterPrefs.h"
|
||||
"ScreenOptionsMemoryCard.h"
|
||||
"ScreenOptionsToggleSongs.h"
|
||||
)
|
||||
"ScreenOptions.h"
|
||||
"ScreenOptionsCourseOverview.h"
|
||||
"ScreenOptionsEditCourse.h"
|
||||
"ScreenOptionsEditProfile.h"
|
||||
"ScreenOptionsExportPackage.h"
|
||||
"ScreenOptionsManageCourses.h"
|
||||
"ScreenOptionsManageEditSteps.h"
|
||||
"ScreenOptionsManageProfiles.h"
|
||||
"ScreenOptionsMaster.h"
|
||||
"ScreenOptionsMasterPrefs.h"
|
||||
"ScreenOptionsMemoryCard.h"
|
||||
"ScreenOptionsToggleSongs.h")
|
||||
|
||||
source_group("Screens\\\\Options" FILES ${SMDATA_SCREEN_OPTION_SRC} ${SMDATA_SCREEN_OPTION_HPP})
|
||||
source_group("Screens\\\\Options"
|
||||
FILES
|
||||
${SMDATA_SCREEN_OPTION_SRC}
|
||||
${SMDATA_SCREEN_OPTION_HPP})
|
||||
|
||||
list(APPEND SMDATA_SCREEN_REST_SRC
|
||||
"Screen.cpp"
|
||||
"ScreenAttract.cpp"
|
||||
"ScreenBookkeeping.cpp"
|
||||
"ScreenContinue.cpp"
|
||||
"ScreenDebugOverlay.cpp"
|
||||
"ScreenDemonstration.cpp"
|
||||
"ScreenEdit.cpp"
|
||||
"ScreenEditMenu.cpp"
|
||||
"ScreenEnding.cpp"
|
||||
"ScreenEvaluation.cpp"
|
||||
"ScreenExit.cpp"
|
||||
"ScreenHighScores.cpp"
|
||||
"ScreenHowToPlay.cpp"
|
||||
"ScreenInstallOverlay.cpp"
|
||||
"ScreenInstructions.cpp"
|
||||
"ScreenJukebox.cpp"
|
||||
"ScreenMapControllers.cpp"
|
||||
"ScreenMessage.cpp"
|
||||
"ScreenMiniMenu.cpp"
|
||||
"ScreenNameEntry.cpp"
|
||||
"ScreenNameEntryTraditional.cpp"
|
||||
"ScreenPackages.cpp"
|
||||
"ScreenPlayerOptions.cpp"
|
||||
"ScreenProfileLoad.cpp"
|
||||
"ScreenProfileSave.cpp"
|
||||
"ScreenPrompt.cpp"
|
||||
"ScreenRanking.cpp"
|
||||
"ScreenReloadSongs.cpp"
|
||||
"ScreenSandbox.cpp"
|
||||
"ScreenSaveSync.cpp"
|
||||
"ScreenSelect.cpp"
|
||||
"ScreenSelectCharacter.cpp"
|
||||
"ScreenSelectLanguage.cpp"
|
||||
"ScreenSelectMaster.cpp"
|
||||
"ScreenSelectMusic.cpp"
|
||||
"ScreenSelectProfile.cpp"
|
||||
"ScreenServiceAction.cpp"
|
||||
"ScreenSetTime.cpp"
|
||||
"ScreenSongOptions.cpp"
|
||||
"ScreenSplash.cpp"
|
||||
"ScreenStatsOverlay.cpp"
|
||||
"ScreenSyncOverlay.cpp"
|
||||
"ScreenSystemLayer.cpp"
|
||||
"ScreenTestInput.cpp"
|
||||
"ScreenTestLights.cpp"
|
||||
"ScreenTestSound.cpp"
|
||||
"ScreenTextEntry.cpp"
|
||||
"ScreenTitleMenu.cpp"
|
||||
"ScreenUnlockBrowse.cpp"
|
||||
"ScreenUnlockCelebrate.cpp"
|
||||
"ScreenUnlockStatus.cpp"
|
||||
"ScreenWithMenuElements.cpp"
|
||||
)
|
||||
"Screen.cpp"
|
||||
"ScreenAttract.cpp"
|
||||
"ScreenBookkeeping.cpp"
|
||||
"ScreenContinue.cpp"
|
||||
"ScreenDebugOverlay.cpp"
|
||||
"ScreenDemonstration.cpp"
|
||||
"ScreenEdit.cpp"
|
||||
"ScreenEditMenu.cpp"
|
||||
"ScreenEnding.cpp"
|
||||
"ScreenEvaluation.cpp"
|
||||
"ScreenExit.cpp"
|
||||
"ScreenHighScores.cpp"
|
||||
"ScreenHowToPlay.cpp"
|
||||
"ScreenInstallOverlay.cpp"
|
||||
"ScreenInstructions.cpp"
|
||||
"ScreenJukebox.cpp"
|
||||
"ScreenMapControllers.cpp"
|
||||
"ScreenMessage.cpp"
|
||||
"ScreenMiniMenu.cpp"
|
||||
"ScreenNameEntry.cpp"
|
||||
"ScreenNameEntryTraditional.cpp"
|
||||
"ScreenPackages.cpp"
|
||||
"ScreenPlayerOptions.cpp"
|
||||
"ScreenProfileLoad.cpp"
|
||||
"ScreenProfileSave.cpp"
|
||||
"ScreenPrompt.cpp"
|
||||
"ScreenRanking.cpp"
|
||||
"ScreenReloadSongs.cpp"
|
||||
"ScreenSandbox.cpp"
|
||||
"ScreenSaveSync.cpp"
|
||||
"ScreenSelect.cpp"
|
||||
"ScreenSelectCharacter.cpp"
|
||||
"ScreenSelectLanguage.cpp"
|
||||
"ScreenSelectMaster.cpp"
|
||||
"ScreenSelectMusic.cpp"
|
||||
"ScreenSelectProfile.cpp"
|
||||
"ScreenServiceAction.cpp"
|
||||
"ScreenSetTime.cpp"
|
||||
"ScreenSongOptions.cpp"
|
||||
"ScreenSplash.cpp"
|
||||
"ScreenStatsOverlay.cpp"
|
||||
"ScreenSyncOverlay.cpp"
|
||||
"ScreenSystemLayer.cpp"
|
||||
"ScreenTestInput.cpp"
|
||||
"ScreenTestLights.cpp"
|
||||
"ScreenTestSound.cpp"
|
||||
"ScreenTextEntry.cpp"
|
||||
"ScreenTitleMenu.cpp"
|
||||
"ScreenUnlockBrowse.cpp"
|
||||
"ScreenUnlockCelebrate.cpp"
|
||||
"ScreenUnlockStatus.cpp"
|
||||
"ScreenWithMenuElements.cpp")
|
||||
list(APPEND SMDATA_SCREEN_REST_HPP
|
||||
"Screen.h"
|
||||
"ScreenAttract.h"
|
||||
"ScreenBookkeeping.h"
|
||||
"ScreenContinue.h"
|
||||
"ScreenDebugOverlay.h"
|
||||
"ScreenDemonstration.h"
|
||||
"ScreenEdit.h"
|
||||
"ScreenEditMenu.h"
|
||||
"ScreenEnding.h"
|
||||
"ScreenEvaluation.h"
|
||||
"ScreenExit.h"
|
||||
"ScreenHighScores.h"
|
||||
"ScreenHowToPlay.h"
|
||||
"ScreenInstallOverlay.h"
|
||||
"ScreenInstructions.h"
|
||||
"ScreenJukebox.h"
|
||||
"ScreenMapControllers.h"
|
||||
"ScreenMessage.h"
|
||||
"ScreenMiniMenu.h"
|
||||
"ScreenNameEntry.h"
|
||||
"ScreenNameEntryTraditional.h"
|
||||
"ScreenPackages.h"
|
||||
"ScreenPlayerOptions.h"
|
||||
"ScreenProfileLoad.h"
|
||||
"ScreenProfileSave.h"
|
||||
"ScreenPrompt.h"
|
||||
"ScreenRanking.h"
|
||||
"ScreenReloadSongs.h"
|
||||
"ScreenSandbox.h"
|
||||
"ScreenSaveSync.h"
|
||||
"ScreenSelect.h"
|
||||
"ScreenSelectCharacter.h"
|
||||
"ScreenSelectLanguage.h"
|
||||
"ScreenSelectMaster.h"
|
||||
"ScreenSelectMusic.h"
|
||||
"ScreenSelectProfile.h"
|
||||
"ScreenServiceAction.h"
|
||||
"ScreenSetTime.h"
|
||||
"ScreenSongOptions.h"
|
||||
"ScreenSplash.h"
|
||||
"ScreenStatsOverlay.h"
|
||||
"ScreenSyncOverlay.h"
|
||||
"ScreenSystemLayer.h"
|
||||
"ScreenTestInput.h"
|
||||
"ScreenTestLights.h"
|
||||
"ScreenTestSound.h"
|
||||
"ScreenTextEntry.h"
|
||||
"ScreenTitleMenu.h"
|
||||
"ScreenUnlockBrowse.h"
|
||||
"ScreenUnlockCelebrate.h"
|
||||
"ScreenUnlockStatus.h"
|
||||
"ScreenWithMenuElements.h"
|
||||
)
|
||||
"Screen.h"
|
||||
"ScreenAttract.h"
|
||||
"ScreenBookkeeping.h"
|
||||
"ScreenContinue.h"
|
||||
"ScreenDebugOverlay.h"
|
||||
"ScreenDemonstration.h"
|
||||
"ScreenEdit.h"
|
||||
"ScreenEditMenu.h"
|
||||
"ScreenEnding.h"
|
||||
"ScreenEvaluation.h"
|
||||
"ScreenExit.h"
|
||||
"ScreenHighScores.h"
|
||||
"ScreenHowToPlay.h"
|
||||
"ScreenInstallOverlay.h"
|
||||
"ScreenInstructions.h"
|
||||
"ScreenJukebox.h"
|
||||
"ScreenMapControllers.h"
|
||||
"ScreenMessage.h"
|
||||
"ScreenMiniMenu.h"
|
||||
"ScreenNameEntry.h"
|
||||
"ScreenNameEntryTraditional.h"
|
||||
"ScreenPackages.h"
|
||||
"ScreenPlayerOptions.h"
|
||||
"ScreenProfileLoad.h"
|
||||
"ScreenProfileSave.h"
|
||||
"ScreenPrompt.h"
|
||||
"ScreenRanking.h"
|
||||
"ScreenReloadSongs.h"
|
||||
"ScreenSandbox.h"
|
||||
"ScreenSaveSync.h"
|
||||
"ScreenSelect.h"
|
||||
"ScreenSelectCharacter.h"
|
||||
"ScreenSelectLanguage.h"
|
||||
"ScreenSelectMaster.h"
|
||||
"ScreenSelectMusic.h"
|
||||
"ScreenSelectProfile.h"
|
||||
"ScreenServiceAction.h"
|
||||
"ScreenSetTime.h"
|
||||
"ScreenSongOptions.h"
|
||||
"ScreenSplash.h"
|
||||
"ScreenStatsOverlay.h"
|
||||
"ScreenSyncOverlay.h"
|
||||
"ScreenSystemLayer.h"
|
||||
"ScreenTestInput.h"
|
||||
"ScreenTestLights.h"
|
||||
"ScreenTestSound.h"
|
||||
"ScreenTextEntry.h"
|
||||
"ScreenTitleMenu.h"
|
||||
"ScreenUnlockBrowse.h"
|
||||
"ScreenUnlockCelebrate.h"
|
||||
"ScreenUnlockStatus.h"
|
||||
"ScreenWithMenuElements.h")
|
||||
|
||||
source_group("Screens\\\\Others" FILES ${SMDATA_SCREEN_REST_SRC} ${SMDATA_SCREEN_REST_HPP})
|
||||
source_group("Screens\\\\Others"
|
||||
FILES
|
||||
${SMDATA_SCREEN_REST_SRC}
|
||||
${SMDATA_SCREEN_REST_HPP})
|
||||
|
||||
list(APPEND SMDATA_SCREEN_NET_SRC
|
||||
"ScreenNetEvaluation.cpp"
|
||||
"ScreenNetRoom.cpp"
|
||||
"ScreenNetSelectBase.cpp"
|
||||
"ScreenNetSelectMusic.cpp"
|
||||
"ScreenNetworkOptions.cpp"
|
||||
)
|
||||
"ScreenNetEvaluation.cpp"
|
||||
"ScreenNetRoom.cpp"
|
||||
"ScreenNetSelectBase.cpp"
|
||||
"ScreenNetSelectMusic.cpp"
|
||||
"ScreenNetworkOptions.cpp")
|
||||
|
||||
list(APPEND SMDATA_SCREEN_NET_HPP
|
||||
"ScreenNetEvaluation.h"
|
||||
"ScreenNetRoom.h"
|
||||
"ScreenNetSelectBase.h"
|
||||
"ScreenNetSelectMusic.h"
|
||||
"ScreenNetworkOptions.h"
|
||||
)
|
||||
"ScreenNetEvaluation.h"
|
||||
"ScreenNetRoom.h"
|
||||
"ScreenNetSelectBase.h"
|
||||
"ScreenNetSelectMusic.h"
|
||||
"ScreenNetworkOptions.h")
|
||||
|
||||
if (WITH_NETWORKING)
|
||||
list(APPEND SMDATA_SCREEN_NET_SRC
|
||||
"ScreenSMOnlineLogin.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_SCREEN_NET_HPP
|
||||
"ScreenSMOnlineLogin.h"
|
||||
)
|
||||
if(WITH_NETWORKING)
|
||||
list(APPEND SMDATA_SCREEN_NET_SRC "ScreenSMOnlineLogin.cpp")
|
||||
list(APPEND SMDATA_SCREEN_NET_HPP "ScreenSMOnlineLogin.h")
|
||||
endif()
|
||||
|
||||
source_group("Screens\\\\Network" FILES ${SMDATA_SCREEN_NET_SRC} ${SMDATA_SCREEN_NET_HPP})
|
||||
source_group("Screens\\\\Network"
|
||||
FILES
|
||||
${SMDATA_SCREEN_NET_SRC}
|
||||
${SMDATA_SCREEN_NET_HPP})
|
||||
|
||||
list(APPEND SMDATA_ALL_SCREENS_SRC
|
||||
${SMDATA_SCREEN_GAMEPLAY_SRC}
|
||||
${SMDATA_SCREEN_OPTION_SRC}
|
||||
${SMDATA_SCREEN_NET_SRC}
|
||||
${SMDATA_SCREEN_REST_SRC}
|
||||
)
|
||||
${SMDATA_SCREEN_GAMEPLAY_SRC}
|
||||
${SMDATA_SCREEN_OPTION_SRC}
|
||||
${SMDATA_SCREEN_NET_SRC}
|
||||
${SMDATA_SCREEN_REST_SRC})
|
||||
|
||||
list(APPEND SMDATA_ALL_SCREENS_HPP
|
||||
${SMDATA_SCREEN_GAMEPLAY_HPP}
|
||||
${SMDATA_SCREEN_OPTION_HPP}
|
||||
${SMDATA_SCREEN_NET_HPP}
|
||||
${SMDATA_SCREEN_REST_HPP}
|
||||
)
|
||||
${SMDATA_SCREEN_GAMEPLAY_HPP}
|
||||
${SMDATA_SCREEN_OPTION_HPP}
|
||||
${SMDATA_SCREEN_NET_HPP}
|
||||
${SMDATA_SCREEN_REST_HPP})
|
||||
|
||||
@@ -1,65 +1,62 @@
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_SRC
|
||||
"AnnouncerManager.cpp"
|
||||
"Bookkeeper.cpp"
|
||||
"CharacterManager.cpp"
|
||||
"CommandLineActions.cpp"
|
||||
"CryptManager.cpp"
|
||||
"FontManager.cpp"
|
||||
"GameManager.cpp"
|
||||
"GameSoundManager.cpp"
|
||||
"GameState.cpp"
|
||||
"InputFilter.cpp"
|
||||
"InputMapper.cpp"
|
||||
"InputQueue.cpp"
|
||||
"LightsManager.cpp"
|
||||
"LuaManager.cpp"
|
||||
"MemoryCardManager.cpp"
|
||||
"MessageManager.cpp"
|
||||
"NetworkSyncManager.cpp"
|
||||
"NoteSkinManager.cpp"
|
||||
"PrefsManager.cpp"
|
||||
"ProfileManager.cpp"
|
||||
"ScreenManager.cpp"
|
||||
"SongManager.cpp"
|
||||
"StatsManager.cpp"
|
||||
"ThemeManager.cpp"
|
||||
"UnlockManager.cpp"
|
||||
)
|
||||
"AnnouncerManager.cpp"
|
||||
"Bookkeeper.cpp"
|
||||
"CharacterManager.cpp"
|
||||
"CommandLineActions.cpp"
|
||||
"CryptManager.cpp"
|
||||
"FontManager.cpp"
|
||||
"GameManager.cpp"
|
||||
"GameSoundManager.cpp"
|
||||
"GameState.cpp"
|
||||
"InputFilter.cpp"
|
||||
"InputMapper.cpp"
|
||||
"InputQueue.cpp"
|
||||
"LightsManager.cpp"
|
||||
"LuaManager.cpp"
|
||||
"MemoryCardManager.cpp"
|
||||
"MessageManager.cpp"
|
||||
"NetworkSyncManager.cpp"
|
||||
"NoteSkinManager.cpp"
|
||||
"PrefsManager.cpp"
|
||||
"ProfileManager.cpp"
|
||||
"ScreenManager.cpp"
|
||||
"SongManager.cpp"
|
||||
"StatsManager.cpp"
|
||||
"ThemeManager.cpp"
|
||||
"UnlockManager.cpp")
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_HPP
|
||||
"AnnouncerManager.h"
|
||||
"Bookkeeper.h"
|
||||
"CharacterManager.h"
|
||||
"CommandLineActions.h"
|
||||
"CryptManager.h"
|
||||
"FontManager.h"
|
||||
"GameManager.h"
|
||||
"GameSoundManager.h"
|
||||
"GameState.h"
|
||||
"InputFilter.h"
|
||||
"InputMapper.h"
|
||||
"InputQueue.h"
|
||||
"LightsManager.h"
|
||||
"LuaManager.h"
|
||||
"MemoryCardManager.h"
|
||||
"MessageManager.h"
|
||||
"NetworkSyncManager.h"
|
||||
"NoteSkinManager.h"
|
||||
"PrefsManager.h"
|
||||
"ProfileManager.h"
|
||||
"ScreenManager.h"
|
||||
"SongManager.h"
|
||||
"StatsManager.h"
|
||||
"ThemeManager.h"
|
||||
"UnlockManager.h"
|
||||
)
|
||||
"AnnouncerManager.h"
|
||||
"Bookkeeper.h"
|
||||
"CharacterManager.h"
|
||||
"CommandLineActions.h"
|
||||
"CryptManager.h"
|
||||
"FontManager.h"
|
||||
"GameManager.h"
|
||||
"GameSoundManager.h"
|
||||
"GameState.h"
|
||||
"InputFilter.h"
|
||||
"InputMapper.h"
|
||||
"InputQueue.h"
|
||||
"LightsManager.h"
|
||||
"LuaManager.h"
|
||||
"MemoryCardManager.h"
|
||||
"MessageManager.h"
|
||||
"NetworkSyncManager.h"
|
||||
"NoteSkinManager.h"
|
||||
"PrefsManager.h"
|
||||
"ProfileManager.h"
|
||||
"ScreenManager.h"
|
||||
"SongManager.h"
|
||||
"StatsManager.h"
|
||||
"ThemeManager.h"
|
||||
"UnlockManager.h")
|
||||
|
||||
if(WITH_NETWORKING)
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_SRC
|
||||
"ezsockets.cpp"
|
||||
)
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_HPP
|
||||
"ezsockets.h"
|
||||
)
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_SRC "ezsockets.cpp")
|
||||
list(APPEND SMDATA_GLOBAL_SINGLETON_HPP "ezsockets.h")
|
||||
endif()
|
||||
|
||||
source_group("Global Singletons" FILES ${SMDATA_GLOBAL_SINGLETON_SRC} ${SMDATA_GLOBAL_SINGLETON_HPP})
|
||||
source_group("Global Singletons"
|
||||
FILES
|
||||
${SMDATA_GLOBAL_SINGLETON_SRC}
|
||||
${SMDATA_GLOBAL_SINGLETON_HPP})
|
||||
|
||||
+743
-684
File diff suppressed because it is too large
Load Diff
+25
-19
@@ -1,33 +1,39 @@
|
||||
if (NOT MSVC)
|
||||
if(NOT MSVC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(IRC_DIR "${SM_SRC_DIR}/irc")
|
||||
|
||||
list(APPEND IRC_SRC
|
||||
"${IRC_DIR}/appveyor.cpp"
|
||||
)
|
||||
list(APPEND IRC_SRC "${IRC_DIR}/appveyor.cpp")
|
||||
|
||||
source_group("" FILES ${IRC_SRC})
|
||||
|
||||
add_executable("irc-reporter" ${IRC_SRC})
|
||||
add_executable("irc-reporter" ${IRC_SRC})
|
||||
|
||||
set_property(TARGET "irc-reporter" PROPERTY FOLDER "Internal Libraries")
|
||||
|
||||
disable_project_warnings("irc-reporter")
|
||||
|
||||
set_target_properties("irc-reporter" PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SM_PROGRAM_DIR}"
|
||||
)
|
||||
set_target_properties("irc-reporter"
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO
|
||||
"${SM_PROGRAM_DIR}")
|
||||
|
||||
set_target_properties("irc-reporter" PROPERTIES
|
||||
OUTPUT_NAME "irc-reporter"
|
||||
RELEASE_OUTPUT_NAME "irc-reporter"
|
||||
DEBUG_OUTPUT_NAME "irc-reporter"
|
||||
MINSIZEREL_OUTPUT_NAME "irc-reporter"
|
||||
RELWITHDEBINFO_OUTPUT_NAME "irc-reporter"
|
||||
)
|
||||
set_target_properties("irc-reporter"
|
||||
PROPERTIES OUTPUT_NAME
|
||||
"irc-reporter"
|
||||
RELEASE_OUTPUT_NAME
|
||||
"irc-reporter"
|
||||
DEBUG_OUTPUT_NAME
|
||||
"irc-reporter"
|
||||
MINSIZEREL_OUTPUT_NAME
|
||||
"irc-reporter"
|
||||
RELWITHDEBINFO_OUTPUT_NAME
|
||||
"irc-reporter")
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
if (NOT MSVC)
|
||||
if(NOT MSVC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(MAPCONV_DIR "${SM_SRC_DIR}/archutils/Win32")
|
||||
|
||||
list(APPEND MAPCONV_SRC
|
||||
"${MAPCONV_DIR}/mapconv.cpp"
|
||||
)
|
||||
list(APPEND MAPCONV_SRC "${MAPCONV_DIR}/mapconv.cpp")
|
||||
|
||||
source_group("" FILES ${MAPCONV_SRC})
|
||||
|
||||
@@ -16,18 +14,26 @@ set_property(TARGET "mapconv" PROPERTY FOLDER "Internal Libraries")
|
||||
|
||||
disable_project_warnings("mapconv")
|
||||
|
||||
set_target_properties("mapconv" PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SM_PROGRAM_DIR}"
|
||||
)
|
||||
set_target_properties("mapconv"
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO
|
||||
"${SM_PROGRAM_DIR}")
|
||||
|
||||
set_target_properties("mapconv" PROPERTIES
|
||||
OUTPUT_NAME "mapconv"
|
||||
RELEASE_OUTPUT_NAME "mapconv"
|
||||
DEBUG_OUTPUT_NAME "mapconv"
|
||||
MINSIZEREL_OUTPUT_NAME "mapconv"
|
||||
RELWITHDEBINFO_OUTPUT_NAME "mapconv"
|
||||
)
|
||||
set_target_properties("mapconv"
|
||||
PROPERTIES OUTPUT_NAME
|
||||
"mapconv"
|
||||
RELEASE_OUTPUT_NAME
|
||||
"mapconv"
|
||||
DEBUG_OUTPUT_NAME
|
||||
"mapconv"
|
||||
MINSIZEREL_OUTPUT_NAME
|
||||
"mapconv"
|
||||
RELWITHDEBINFO_OUTPUT_NAME
|
||||
"mapconv")
|
||||
|
||||
@@ -1,73 +1,79 @@
|
||||
if (NOT MSVC)
|
||||
if(NOT MSVC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(TEXTURE_DIR "${SM_SRC_DIR}/Texture Font Generator")
|
||||
|
||||
list(APPEND TEXTURE_SRC
|
||||
"${TEXTURE_DIR}/stdafx.cpp"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.cpp"
|
||||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.cpp"
|
||||
"${TEXTURE_DIR}/TextureFont.cpp"
|
||||
"${TEXTURE_DIR}/Utils.cpp"
|
||||
)
|
||||
"${TEXTURE_DIR}/stdafx.cpp"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.cpp"
|
||||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.cpp"
|
||||
"${TEXTURE_DIR}/TextureFont.cpp"
|
||||
"${TEXTURE_DIR}/Utils.cpp")
|
||||
|
||||
list(APPEND TEXTURE_HPP
|
||||
"${TEXTURE_DIR}/Resource.h"
|
||||
"${TEXTURE_DIR}/stdafx.h"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.h"
|
||||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.h"
|
||||
"${TEXTURE_DIR}/TextureFont.h"
|
||||
"${TEXTURE_DIR}/Utils.h"
|
||||
)
|
||||
"${TEXTURE_DIR}/Resource.h"
|
||||
"${TEXTURE_DIR}/stdafx.h"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.h"
|
||||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.h"
|
||||
"${TEXTURE_DIR}/TextureFont.h"
|
||||
"${TEXTURE_DIR}/Utils.h")
|
||||
|
||||
list(APPEND TEXTURE_DAT
|
||||
"${TEXTURE_DIR}/res/Texture Font Generator.ico"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.rc"
|
||||
"${TEXTURE_DIR}/res/Texture Font Generator.rc2"
|
||||
)
|
||||
"${TEXTURE_DIR}/res/Texture Font Generator.ico"
|
||||
"${TEXTURE_DIR}/Texture Font Generator.rc"
|
||||
"${TEXTURE_DIR}/res/Texture Font Generator.rc2")
|
||||
|
||||
source_group("Source Files" FILES ${TEXTURE_SRC} ${TEXTURE_HPP})
|
||||
source_group("Resource Files" FILES ${TEXTURE_DAT})
|
||||
set(CMAKE_MFC_FLAG 2)
|
||||
add_executable("TextureFontGenerator" WIN32 ${TEXTURE_SRC} ${TEXTURE_HPP} ${TEXTURE_DAT})
|
||||
add_executable("TextureFontGenerator"
|
||||
WIN32
|
||||
${TEXTURE_SRC}
|
||||
${TEXTURE_HPP}
|
||||
${TEXTURE_DAT})
|
||||
unset(CMAKE_MFC_FLAG)
|
||||
set_property(TARGET "TextureFontGenerator" PROPERTY FOLDER "Internal Libraries")
|
||||
|
||||
disable_project_warnings("TextureFontGenerator")
|
||||
|
||||
if (NOT WITH_STATIC_LINKING)
|
||||
if(NOT WITH_STATIC_LINKING)
|
||||
sm_add_compile_definition("TextureFontGenerator" _AFXDLL)
|
||||
endif()
|
||||
|
||||
list(APPEND TEXTURE_LINK_LIB
|
||||
"zlib"
|
||||
"png"
|
||||
)
|
||||
list(APPEND TEXTURE_LINK_LIB "zlib" "png")
|
||||
|
||||
target_link_libraries("TextureFontGenerator" ${TEXTURE_LINK_LIB})
|
||||
|
||||
list(APPEND TEXTURE_INCLUDE_DIRS
|
||||
"${TEXTURE_DIR}"
|
||||
"${TEXTURE_DIR}/res"
|
||||
"${SM_EXTERN_DIR}/zlib"
|
||||
"${SM_EXTERN_DIR}/libpng/include"
|
||||
)
|
||||
"${TEXTURE_DIR}"
|
||||
"${TEXTURE_DIR}/res"
|
||||
"${SM_EXTERN_DIR}/zlib"
|
||||
"${SM_EXTERN_DIR}/libpng/include")
|
||||
|
||||
target_include_directories("TextureFontGenerator" PUBLIC ${TEXTURE_INCLUDE_DIRS})
|
||||
target_include_directories("TextureFontGenerator"
|
||||
PUBLIC ${TEXTURE_INCLUDE_DIRS})
|
||||
|
||||
set_target_properties("TextureFontGenerator" PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SM_PROGRAM_DIR}"
|
||||
)
|
||||
set_target_properties("TextureFontGenerator"
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL
|
||||
"${SM_PROGRAM_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO
|
||||
"${SM_PROGRAM_DIR}")
|
||||
|
||||
set_target_properties("TextureFontGenerator" PROPERTIES
|
||||
OUTPUT_NAME "Texture Font Generator"
|
||||
RELEASE_OUTPUT_NAME "Texture Font Generator"
|
||||
DEBUG_OUTPUT_NAME "Texture Font Generator"
|
||||
MINSIZEREL_OUTPUT_NAME "Texture Font Generator"
|
||||
RELWITHDEBINFO_OUTPUT_NAME "Texture Font Generator"
|
||||
)
|
||||
set_target_properties("TextureFontGenerator"
|
||||
PROPERTIES OUTPUT_NAME
|
||||
"Texture Font Generator"
|
||||
RELEASE_OUTPUT_NAME
|
||||
"Texture Font Generator"
|
||||
DEBUG_OUTPUT_NAME
|
||||
"Texture Font Generator"
|
||||
MINSIZEREL_OUTPUT_NAME
|
||||
"Texture Font Generator"
|
||||
RELWITHDEBINFO_OUTPUT_NAME
|
||||
"Texture Font Generator")
|
||||
|
||||
@@ -74,13 +74,13 @@ static const int KEY_LENGTH = 1024;
|
||||
openssl genrsa -out testing -outform DER
|
||||
openssl rsa -in testing -out testing2 -outform DER
|
||||
openssl rsa -in testing -out testing2 -pubout -outform DER
|
||||
|
||||
|
||||
openssl pkcs8 -inform DER -outform DER -nocrypt -in private.rsa -out private.der
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static PRNGWrapper *g_pPRNG = NULL;
|
||||
|
||||
ltc_math_descriptor ltc_mp = ltm_desc;
|
||||
|
||||
CryptManager::CryptManager()
|
||||
{
|
||||
@@ -93,8 +93,6 @@ CryptManager::CryptManager()
|
||||
LUA->Release( L );
|
||||
}
|
||||
|
||||
ltc_mp = ltm_desc;
|
||||
|
||||
g_pPRNG = new PRNGWrapper( &yarrow_desc );
|
||||
}
|
||||
|
||||
@@ -144,7 +142,7 @@ static bool WriteFile( RString sFile, RString sBuf )
|
||||
LOG->Warn( "WriteFile: opening %s failed: %s", sFile.c_str(), output.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if( output.Write(sBuf) == -1 || output.Flush() == -1 )
|
||||
{
|
||||
LOG->Warn( "WriteFile: writing %s failed: %s", sFile.c_str(), output.GetError().c_str() );
|
||||
@@ -447,7 +445,7 @@ RString CryptManager::GenerateRandomUUID()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
/** @brief Allow Lua to have access to the CryptManager. */
|
||||
/** @brief Allow Lua to have access to the CryptManager. */
|
||||
class LunaCryptManager: public Luna<CryptManager>
|
||||
{
|
||||
public:
|
||||
@@ -504,7 +502,7 @@ LUA_REGISTER_CLASS( CryptManager )
|
||||
/*
|
||||
* (c) 2004-2007 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -514,7 +512,7 @@ LUA_REGISTER_CLASS( CryptManager )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
+28
-27
@@ -12,7 +12,7 @@
|
||||
/** @brief Act on each non empty row in the specified track within the specified range. */
|
||||
#define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( nd, track, row, start, last ) \
|
||||
for( int row = start-1; (nd).GetNextTapNoteRowForTrack(track,row) && row < (last); )
|
||||
/** @brief Act on each non empty row in the specified track within the specified range,
|
||||
/** @brief Act on each non empty row in the specified track within the specified range,
|
||||
going in reverse order. */
|
||||
#define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( nd, track, row, start, last ) \
|
||||
for( int row = last; (nd).GetPrevTapNoteRowForTrack(track,row) && row >= (start); )
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
typedef map<int,TapNote>::const_iterator const_iterator;
|
||||
typedef map<int,TapNote>::reverse_iterator reverse_iterator;
|
||||
typedef map<int,TapNote>::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
|
||||
NoteData(): m_TapNotes() {}
|
||||
|
||||
iterator begin( int iTrack ) { return m_TapNotes[iTrack].begin(); }
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
ND *m_pNoteData;
|
||||
vector<iter> m_vBeginIters;
|
||||
|
||||
/* There isn't a "past the beginning" iterator so this is hard to make a true bidirectional iterator.
|
||||
/* There isn't a "past the beginning" iterator so this is hard to make a true bidirectional iterator.
|
||||
* Use the "past the end" iterator in place of the "past the beginning" iterator when in reverse. */
|
||||
vector<iter> m_vCurrentIters;
|
||||
|
||||
@@ -107,35 +107,35 @@ private:
|
||||
// There's no point in inserting empty notes into the map.
|
||||
// Any blank space in the map is defined to be empty.
|
||||
vector<TrackMap> m_TapNotes;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine whether this note is for Player 1 or Player 2.
|
||||
* @param track the track/column the note is in.
|
||||
* @param tn the note in question. Required for routine mode.
|
||||
* @return true if it's for player 1, false for player 2. */
|
||||
bool IsPlayer1(const int track, const TapNote &tn) const;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine if the note in question should be counted as a tap.
|
||||
* @param tn the note in question.
|
||||
* @param row the row it lives in.
|
||||
* @return true if it's a tap, false otherwise. */
|
||||
bool IsTap(const TapNote &tn, const int row) const;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine if the note in question should be counted as a mine.
|
||||
* @param tn the note in question.
|
||||
* @param row the row it lives in.
|
||||
* @return true if it's a mine, false otherwise. */
|
||||
bool IsMine(const TapNote &tn, const int row) const;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine if the note in question should be counted as a lift.
|
||||
* @param tn the note in question.
|
||||
* @param row the row it lives in.
|
||||
* @return true if it's a lift, false otherwise. */
|
||||
bool IsLift(const TapNote &tn, const int row) const;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine if the note in question should be counted as a fake.
|
||||
* @param tn the note in question.
|
||||
@@ -159,14 +159,14 @@ private:
|
||||
|
||||
// Mina stuf (Used for chartkey hashing)
|
||||
std::vector<int> NonEmptyRowVector;
|
||||
|
||||
|
||||
public:
|
||||
void Init();
|
||||
|
||||
// Mina stuf (Used for chartkey hashing)
|
||||
void LogNonEmptyRows();
|
||||
std::vector<int>& GetNonEmptyRowVector() { return NonEmptyRowVector; };
|
||||
|
||||
|
||||
int GetNumTracks() const { return m_TapNotes.size(); }
|
||||
void SetNumTracks( int iNewNumTracks );
|
||||
bool IsComposite() const;
|
||||
@@ -193,10 +193,10 @@ public:
|
||||
/**
|
||||
* @brief Return an iterator range for [rowBegin,rowEnd).
|
||||
*
|
||||
* This can be used to efficiently iterate trackwise over a range of notes.
|
||||
* It's like FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE, except it only requires
|
||||
* This can be used to efficiently iterate trackwise over a range of notes.
|
||||
* It's like FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE, except it only requires
|
||||
* two map searches (iterating is constant time), but the iterators will
|
||||
* become invalid if the notes they represent disappear, so you need to
|
||||
* become invalid if the notes they represent disappear, so you need to
|
||||
* pay attention to how you modify the data.
|
||||
* @param iTrack the column to use.
|
||||
* @param iStartRow the starting point.
|
||||
@@ -319,8 +319,8 @@ public:
|
||||
{
|
||||
return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// This row needs at least iMinSimultaneousPresses either tapped or held.
|
||||
bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const;
|
||||
@@ -344,31 +344,31 @@ public:
|
||||
// the couple/routine style variants of the above.
|
||||
pair<int, int> GetNumTapNotesTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumJumpsTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumHandsTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumQuadsTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumHoldNotesTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumMinesTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumRollsTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumLiftsTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
pair<int, int> GetNumFakesTwoPlayer(int startRow = 0,
|
||||
int endRow = MAX_NOTE_ROW) const;
|
||||
|
||||
|
||||
// Transformations
|
||||
void LoadTransformed(const NoteData& original,
|
||||
int iNewNumTracks,
|
||||
@@ -382,7 +382,8 @@ public:
|
||||
/** @brief Allow a quick way to swap notedata. */
|
||||
namespace std
|
||||
{
|
||||
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); }
|
||||
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) noexcept(is_nothrow_move_constructible<NoteData>::value &&
|
||||
is_nothrow_move_assignable<NoteData>::value) { nd1.swap( nd2 ); }
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -390,7 +391,7 @@ namespace std
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -400,7 +401,7 @@ namespace std
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#ifndef RAGE_DISPLAY_OGL_H
|
||||
#define RAGE_DISPLAY_OGL_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define GL_SILENCE_DEPRECATION 1
|
||||
#endif
|
||||
|
||||
#include "RageDisplay.h"
|
||||
#include "RageTextureRenderTarget.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
@@ -16,6 +16,12 @@ namespace jpeg
|
||||
}
|
||||
}
|
||||
|
||||
// Only Xcode wants this. FIXME
|
||||
#if defined(PBBUILD) && defined(SYSTEM_JPEGLIB)
|
||||
#define TRUE jpeg::TRUE
|
||||
#define FALSE jpeg::FALSE
|
||||
#endif
|
||||
|
||||
#define OUTPUT_BUFFER_SIZE 4096
|
||||
typedef struct
|
||||
{
|
||||
@@ -149,7 +155,7 @@ bool RageSurfaceUtils::SaveJPEG( RageSurface *surface, RageFile &f, bool bHighQu
|
||||
/*
|
||||
* (c) 2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -159,7 +165,7 @@ bool RageSurfaceUtils::SaveJPEG( RageSurface *surface, RageFile &f, bool bHighQu
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
+8
-7
@@ -6,6 +6,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include "global.h"
|
||||
class RageFileDriver;
|
||||
|
||||
/** @brief Safely delete pointers. */
|
||||
@@ -193,7 +194,7 @@ static inline T enum_cycle( T val, int iMax, int iAmt = 1 )
|
||||
}
|
||||
|
||||
|
||||
/* We only have unsigned swaps; byte swapping a signed value doesn't make sense.
|
||||
/* We only have unsigned swaps; byte swapping a signed value doesn't make sense.
|
||||
*
|
||||
* Platform-specific, optimized versions are defined in arch_setup, with the names
|
||||
* ArchSwap32, ArchSwap24, and ArchSwap16; we define them to their real names here,
|
||||
@@ -488,16 +489,16 @@ float calc_mean( const float *pStart, const float *pEnd );
|
||||
* deviation. */
|
||||
float calc_stddev( const float *pStart, const float *pEnd, bool bSample = false );
|
||||
|
||||
/*
|
||||
* Find the slope, intercept, and error of a linear least squares regression
|
||||
/*
|
||||
* Find the slope, intercept, and error of a linear least squares regression
|
||||
* of the points given. Error is returned as the sqrt of the average squared
|
||||
* Y distance from the chosen line.
|
||||
* Returns true on success, false on failure.
|
||||
* Y distance from the chosen line.
|
||||
* Returns true on success, false on failure.
|
||||
*/
|
||||
bool CalcLeastSquares( const vector< pair<float, float> > &vCoordinates,
|
||||
float &fSlope, float &fIntercept, float &fError );
|
||||
|
||||
/*
|
||||
/*
|
||||
* This method throws away any points that are more than fCutoff away from
|
||||
* the line defined by fSlope and fIntercept.
|
||||
*/
|
||||
@@ -601,7 +602,7 @@ struct char_traits_char_nocase: public char_traits<char>
|
||||
{
|
||||
return g_UpperCase[(unsigned char)a];
|
||||
}
|
||||
|
||||
|
||||
static const char *find( const char* s, int n, char a )
|
||||
{
|
||||
a = fasttoupper(a);
|
||||
|
||||
@@ -452,6 +452,7 @@ wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool b
|
||||
{
|
||||
CGEventRef event = CGEventCreate(NULL);
|
||||
CGEventFlags mods = CGEventGetFlags(event);
|
||||
CFRelease(event);
|
||||
UInt32 nModifiers = bUseCurrentKeyModifiers ? (UInt32)mods : 0;
|
||||
wchar_t sCharCode = KeyCodeToChar( iMacVirtualKey, nModifiers );
|
||||
if( sCharCode != 0 )
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define LOADING_WINDOW_H
|
||||
|
||||
#include <string>
|
||||
#include "global.h"
|
||||
|
||||
struct RageSurface;
|
||||
/** @brief Opens and displays the loading banner. */
|
||||
@@ -33,7 +34,7 @@ protected:
|
||||
* @author Glenn Maynard (c) 2002-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -43,7 +44,7 @@ protected:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define LOADING_WINDOW_MACOSX_H
|
||||
|
||||
#include "LoadingWindow.h"
|
||||
#include "global.h"
|
||||
/** @brief Loading window for Mac OS X. */
|
||||
class LoadingWindow_MacOSX : public LoadingWindow
|
||||
{
|
||||
|
||||
@@ -516,6 +516,9 @@ static size_t GetDisplayBitsPerPixel( CGDirectDisplayID displayId )
|
||||
depth = 16;
|
||||
else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo)
|
||||
depth = 8;
|
||||
|
||||
CFRelease(pixEnc);
|
||||
CGDisplayModeRelease(mode);
|
||||
|
||||
return depth;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ static void FixLilEndian()
|
||||
#if defined(ENDIAN_LITTLE)
|
||||
static bool Initialized = false;
|
||||
if( Initialized )
|
||||
return;
|
||||
return;
|
||||
Initialized = true;
|
||||
|
||||
for( int i = 0; i < AVPixelFormats[i].bpp; ++i )
|
||||
@@ -90,7 +90,7 @@ RageSurface *RageMovieTextureDriver_FFMpeg::AVCodecCreateCompatibleSurface( int
|
||||
break;
|
||||
ASSERT( AVPixelFormats[iAVTexfmtIndex].bpp != 0 );
|
||||
}
|
||||
|
||||
|
||||
const AVPixelFormat_t *pfd = &AVPixelFormats[iAVTexfmtIndex];
|
||||
iAVTexfmt = pfd->pf;
|
||||
fmtout = pfd->YUV;
|
||||
@@ -140,6 +140,12 @@ MovieDecoder_FFMpeg::~MovieDecoder_FFMpeg()
|
||||
{
|
||||
avcodec::av_free(m_buffer);
|
||||
}
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
if ( m_pStreamCodec != NULL)
|
||||
{
|
||||
avcodec::avcodec_free_context(&m_pStreamCodec);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MovieDecoder_FFMpeg::Init()
|
||||
@@ -231,7 +237,7 @@ int MovieDecoder_FFMpeg::ReadPacket()
|
||||
/* EOF. */
|
||||
m_iEOF = 1;
|
||||
m_Packet.size = 0;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -262,19 +268,26 @@ int MovieDecoder_FFMpeg::DecodePacket( float fTargetTime )
|
||||
if( m_Packet.size == 0 && m_iFrameNumber == -1 )
|
||||
return 0; /* eof */
|
||||
|
||||
bool bSkipThisFrame =
|
||||
bool bSkipThisFrame =
|
||||
fTargetTime != -1 &&
|
||||
GetTimestamp() + GetFrameDuration() < fTargetTime &&
|
||||
(m_pStream->codec->frame_number % 2) == 0;
|
||||
(m_pStreamCodec->frame_number % 2) == 0;
|
||||
|
||||
int iGotFrame;
|
||||
int len;
|
||||
/* Hack: we need to send size = 0 to flush frames at the end, but we have
|
||||
* to give it a buffer to read from since it tries to read anyway. */
|
||||
m_Packet.data = m_Packet.size ? m_Packet.data : NULL;
|
||||
int len = avcodec::avcodec_decode_video2(
|
||||
m_pStream->codec,
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
len = avcodec::avcodec_decode_video2(
|
||||
m_pStreamCodec,
|
||||
m_Frame, &iGotFrame,
|
||||
&m_Packet );
|
||||
#else
|
||||
len = m_Packet.size;
|
||||
avcodec::avcodec_send_packet(m_pStreamCodec, &m_Packet);
|
||||
iGotFrame = !avcodec::avcodec_receive_frame(m_pStreamCodec, m_Frame);
|
||||
#endif
|
||||
|
||||
if( len < 0 )
|
||||
{
|
||||
@@ -333,9 +346,15 @@ int MovieDecoder_FFMpeg::DecodePacket( float fTargetTime )
|
||||
|
||||
void MovieDecoder_FFMpeg::GetFrame( RageSurface *pSurface )
|
||||
{
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
avcodec::AVPicture pict;
|
||||
pict.data[0] = (unsigned char *) pSurface->pixels;
|
||||
pict.linesize[0] = pSurface->pitch;
|
||||
#else
|
||||
avcodec::AVFrame pict;
|
||||
pict.data[0] = (unsigned char *) pSurface->pixels;
|
||||
pict.linesize[0] = pSurface->pitch;
|
||||
#endif
|
||||
|
||||
/* XXX 1: Do this in one of the Open() methods instead?
|
||||
* XXX 2: The problem of doing this in Open() is that m_AVTexfmt is not
|
||||
@@ -344,12 +363,12 @@ void MovieDecoder_FFMpeg::GetFrame( RageSurface *pSurface )
|
||||
if( m_swsctx == NULL )
|
||||
{
|
||||
m_swsctx = avcodec::sws_getCachedContext( m_swsctx,
|
||||
GetWidth(), GetHeight(), m_pStream->codec->pix_fmt,
|
||||
GetWidth(), GetHeight(), m_pStreamCodec->pix_fmt,
|
||||
GetWidth(), GetHeight(), m_AVTexfmt,
|
||||
sws_flags, NULL, NULL, NULL );
|
||||
if( m_swsctx == NULL )
|
||||
{
|
||||
LOG->Warn("Cannot initialize sws conversion context for (%d,%d) %d->%d", GetWidth(), GetHeight(), m_pStream->codec->pix_fmt, m_AVTexfmt);
|
||||
LOG->Warn("Cannot initialize sws conversion context for (%d,%d) %d->%d", GetWidth(), GetHeight(), m_pStreamCodec->pix_fmt, m_AVTexfmt);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -366,7 +385,7 @@ static RString averr_ssprintf( int err, const char *fmt, ... )
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString s = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_end(va);
|
||||
|
||||
size_t errbuf_size = 512;
|
||||
char* errbuf = new char[errbuf_size];
|
||||
@@ -384,8 +403,10 @@ void MovieTexture_FFMpeg::RegisterProtocols()
|
||||
return;
|
||||
Done = true;
|
||||
|
||||
#if !FF_API_NEXT
|
||||
avcodec::avcodec_register_all();
|
||||
avcodec::av_register_all();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int AVIORageFile_ReadPacket( void *opaque, uint8_t *buf, int buf_size )
|
||||
@@ -396,27 +417,27 @@ static int AVIORageFile_ReadPacket( void *opaque, uint8_t *buf, int buf_size )
|
||||
|
||||
static int64_t AVIORageFile_Seek( void *opaque, int64_t offset, int whence )
|
||||
{
|
||||
RageFile *f = (RageFile *)opaque;
|
||||
RageFile *f = (RageFile *)opaque;
|
||||
if( whence == AVSEEK_SIZE )
|
||||
return f->GetFileSize();
|
||||
|
||||
|
||||
if( whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END )
|
||||
{
|
||||
LOG->Trace("Error: unsupported seek whence: %d", whence);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return f->Seek( (int) offset, whence );
|
||||
}
|
||||
|
||||
RString MovieDecoder_FFMpeg::Open( RString sFile )
|
||||
{
|
||||
MovieTexture_FFMpeg::RegisterProtocols();
|
||||
|
||||
|
||||
m_fctx = avcodec::avformat_alloc_context();
|
||||
if( !m_fctx )
|
||||
return "AVCodec: Couldn't allocate context";
|
||||
|
||||
|
||||
RageFile *f = new RageFile;
|
||||
|
||||
if( !f->Open(sFile, RageFile::READ) )
|
||||
@@ -444,16 +465,23 @@ RString MovieDecoder_FFMpeg::Open( RString sFile )
|
||||
m_fctx->streams[stream_idx] == NULL )
|
||||
return "Couldn't find any video streams";
|
||||
m_pStream = m_fctx->streams[stream_idx];
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
m_pStreamCodec = avcodec::avcodec_alloc_context3(NULL);
|
||||
if (avcodec::avcodec_parameters_to_context(m_pStreamCodec, m_pStream->codecpar) < 0)
|
||||
return ssprintf("Could not get context from parameters");
|
||||
#else
|
||||
m_pStreamCodec = m_pStream->codec;
|
||||
#endif
|
||||
|
||||
if( m_pStream->codec->codec_id == avcodec::CODEC_ID_NONE )
|
||||
return ssprintf( "Unsupported codec %08x", m_pStream->codec->codec_tag );
|
||||
if( m_pStreamCodec->codec_id == avcodec::CODEC_ID_NONE )
|
||||
return ssprintf( "Unsupported codec %08x", m_pStreamCodec->codec_tag );
|
||||
|
||||
RString sError = OpenCodec();
|
||||
if( !sError.empty() )
|
||||
return ssprintf( "AVCodec (%s): %s", sFile.c_str(), sError.c_str() );
|
||||
|
||||
LOG->Trace( "Bitrate: %i", m_pStream->codec->bit_rate );
|
||||
LOG->Trace( "Codec pixel format: %s", avcodec::av_get_pix_fmt_name(m_pStream->codec->pix_fmt) );
|
||||
LOG->Trace( "Bitrate: %i", static_cast<int>(m_pStreamCodec->bit_rate) );
|
||||
LOG->Trace( "Codec pixel format: %s", avcodec::av_get_pix_fmt_name(m_pStreamCodec->pix_fmt) );
|
||||
|
||||
return RString();
|
||||
}
|
||||
@@ -463,35 +491,37 @@ RString MovieDecoder_FFMpeg::OpenCodec()
|
||||
Init();
|
||||
|
||||
ASSERT( m_pStream != NULL );
|
||||
if( m_pStream->codec->codec )
|
||||
avcodec::avcodec_close( m_pStream->codec );
|
||||
if( m_pStreamCodec->codec )
|
||||
avcodec::avcodec_close( m_pStreamCodec );
|
||||
|
||||
avcodec::AVCodec *pCodec = avcodec::avcodec_find_decoder( m_pStream->codec->codec_id );
|
||||
avcodec::AVCodec *pCodec = avcodec::avcodec_find_decoder( m_pStreamCodec->codec_id );
|
||||
if( pCodec == NULL )
|
||||
return ssprintf( "Couldn't find decoder %i", m_pStream->codec->codec_id );
|
||||
return ssprintf( "Couldn't find decoder %i", m_pStreamCodec->codec_id );
|
||||
|
||||
m_pStream->codec->workaround_bugs = 1;
|
||||
m_pStream->codec->idct_algo = FF_IDCT_AUTO;
|
||||
m_pStream->codec->error_concealment = 3;
|
||||
m_pStreamCodec->workaround_bugs = 1;
|
||||
m_pStreamCodec->idct_algo = FF_IDCT_AUTO;
|
||||
m_pStreamCodec->error_concealment = 3;
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
if( pCodec->capabilities & CODEC_CAP_DR1 )
|
||||
m_pStream->codec->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
m_pStreamCodec->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
#endif
|
||||
|
||||
LOG->Trace("Opening codec %s", pCodec->name );
|
||||
|
||||
int ret = avcodec::avcodec_open2( m_pStream->codec, pCodec, NULL );
|
||||
int ret = avcodec::avcodec_open2( m_pStreamCodec, pCodec, NULL );
|
||||
if( ret < 0 )
|
||||
return RString( averr_ssprintf(ret, "Couldn't open codec \"%s\"", pCodec->name) );
|
||||
ASSERT( m_pStream->codec->codec != NULL );
|
||||
ASSERT( m_pStreamCodec->codec != NULL );
|
||||
|
||||
return RString();
|
||||
}
|
||||
|
||||
void MovieDecoder_FFMpeg::Close()
|
||||
{
|
||||
if( m_pStream && m_pStream->codec->codec )
|
||||
if( m_pStream && m_pStreamCodec->codec )
|
||||
{
|
||||
avcodec::avcodec_close( m_pStream->codec );
|
||||
avcodec::avcodec_close( m_pStreamCodec );
|
||||
m_pStream = NULL;
|
||||
}
|
||||
|
||||
@@ -534,7 +564,7 @@ REGISTER_MOVIE_TEXTURE_CLASS( FFMpeg );
|
||||
/*
|
||||
* (c) 2003-2005 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -544,7 +574,7 @@ REGISTER_MOVIE_TEXTURE_CLASS( FFMpeg );
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -13,6 +13,21 @@ namespace avcodec
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libswscale/swscale.h>
|
||||
#include <libavutil/pixdesc.h>
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
#define av_free_packet av_packet_unref
|
||||
#define PixelFormat AVPixelFormat
|
||||
#define PIX_FMT_YUYV422 AV_PIX_FMT_YUYV422
|
||||
#define PIX_FMT_BGRA AV_PIX_FMT_BGRA
|
||||
#define PIX_FMT_ARGB AV_PIX_FMT_ARGB
|
||||
#define PIX_FMT_ABGR AV_PIX_FMT_ABGR
|
||||
#define PIX_FMT_RGBA AV_PIX_FMT_RGBA
|
||||
#define PIX_FMT_RGB24 AV_PIX_FMT_RGB24
|
||||
#define PIX_FMT_BGR24 AV_PIX_FMT_BGR24
|
||||
#define PIX_FMT_RGB555 AV_PIX_FMT_RGB555
|
||||
#define PIX_FMT_NB AV_PIX_FMT_NB
|
||||
#define CODEC_ID_NONE AV_CODEC_ID_NONE
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,8 +63,8 @@ public:
|
||||
void GetFrame( RageSurface *pOut );
|
||||
int DecodeFrame( float fTargetTime );
|
||||
|
||||
int GetWidth() const { return m_pStream->codec->width; }
|
||||
int GetHeight() const { return m_pStream->codec->height; }
|
||||
int GetWidth() const { return m_pStreamCodec->width; }
|
||||
int GetHeight() const { return m_pStreamCodec->height; }
|
||||
|
||||
RageSurface *CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor, MovieDecoderPixelFormatYCbCr &fmtout );
|
||||
|
||||
@@ -66,6 +81,7 @@ private:
|
||||
avcodec::AVFrame *m_Frame;
|
||||
avcodec::PixelFormat m_AVTexfmt; /* PixelFormat of output surface */
|
||||
avcodec::SwsContext *m_swsctx;
|
||||
avcodec::AVCodecContext *m_pStreamCodec;
|
||||
|
||||
avcodec::AVFormatContext *m_fctx;
|
||||
float m_fTimestamp;
|
||||
@@ -106,7 +122,7 @@ static struct AVPixelFormat_t
|
||||
true,
|
||||
PixelFormatYCbCr_YUYV422,
|
||||
},
|
||||
{
|
||||
{
|
||||
32,
|
||||
{ 0x0000FF00,
|
||||
0x00FF0000,
|
||||
@@ -117,7 +133,7 @@ static struct AVPixelFormat_t
|
||||
true,
|
||||
PixelFormatYCbCr_Invalid,
|
||||
},
|
||||
{
|
||||
{
|
||||
32,
|
||||
{ 0x00FF0000,
|
||||
0x0000FF00,
|
||||
@@ -129,7 +145,7 @@ static struct AVPixelFormat_t
|
||||
PixelFormatYCbCr_Invalid,
|
||||
},
|
||||
/*
|
||||
{
|
||||
{
|
||||
32,
|
||||
{ 0x000000FF,
|
||||
0x0000FF00,
|
||||
@@ -140,7 +156,7 @@ static struct AVPixelFormat_t
|
||||
true,
|
||||
PixelFormatYCbCr_Invalid,
|
||||
},
|
||||
{
|
||||
{
|
||||
32,
|
||||
{ 0xFF000000,
|
||||
0x00FF0000,
|
||||
@@ -151,7 +167,7 @@ static struct AVPixelFormat_t
|
||||
true,
|
||||
PixelFormatYCbCr_Invalid,
|
||||
}, */
|
||||
{
|
||||
{
|
||||
24,
|
||||
{ 0xFF0000,
|
||||
0x00FF00,
|
||||
@@ -162,7 +178,7 @@ static struct AVPixelFormat_t
|
||||
true,
|
||||
PixelFormatYCbCr_Invalid,
|
||||
},
|
||||
{
|
||||
{
|
||||
24,
|
||||
{ 0x0000FF,
|
||||
0x00FF00,
|
||||
@@ -192,7 +208,7 @@ static struct AVPixelFormat_t
|
||||
/*
|
||||
* (c) 2003-2005 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -202,7 +218,7 @@ static struct AVPixelFormat_t
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "Threads_Pthreads.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageTimer.h"
|
||||
#include "RageThreads.h"
|
||||
#include "RageUtil.h"
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
@@ -17,6 +19,7 @@
|
||||
|
||||
void ThreadImpl_Pthreads::Halt( bool Kill )
|
||||
{
|
||||
(void)Kill;
|
||||
/* Linux:
|
||||
* Send a SIGSTOP to the thread. If we send a SIGKILL, pthreads will
|
||||
* "helpfully" propagate it to the other threads, and we'll get killed, too.
|
||||
@@ -105,7 +108,7 @@ ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThre
|
||||
} else {
|
||||
// Abbreviate the name by taking the first 6, last 7
|
||||
// characters and adding '..' in the middle.
|
||||
LOG->Trace( "Truncated thread name due to size limit of %d: %s",
|
||||
LOG->Trace( "Truncated thread name due to size limit of %zu: %s",
|
||||
maxNameLen, rawname );
|
||||
snprintf( thread->name, maxNameLen, "%.6s..%s",
|
||||
rawname, &rawname[strlen(rawname) - 7] );
|
||||
|
||||
@@ -10,6 +10,7 @@ class ThreadImpl_Pthreads: public ThreadImpl
|
||||
{
|
||||
public:
|
||||
pthread_t thread;
|
||||
mutable char name[16];
|
||||
|
||||
/* Linux:
|
||||
* Keep a list of child PIDs, so we can send them SIGKILL. This has
|
||||
@@ -99,7 +100,7 @@ private:
|
||||
/*
|
||||
* (c) 2001-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <mach/mach_init.h>
|
||||
#include <mach/mach_error.h>
|
||||
#include "global.h"
|
||||
#include "Backtrace.hpp"
|
||||
#include "Backtrace.h"
|
||||
|
||||
bool SuspendThread( uint64_t threadHandle )
|
||||
{
|
||||
@@ -25,13 +25,13 @@ bool GetThreadBacktraceContext( uint64_t iID, BacktraceContext *ctx )
|
||||
/* Can't GetThreadBacktraceContext the current thread. */
|
||||
ASSERT( iID != GetCurrentThreadId() );
|
||||
SuspendThread( iID );
|
||||
|
||||
thread_act_t thread = thread_act_t( iID );
|
||||
|
||||
thread_act_t thread = thread_act_t( iID );
|
||||
|
||||
#if defined(__i386__)
|
||||
i386_thread_state_t state;
|
||||
mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
|
||||
|
||||
|
||||
if( thread_get_state(thread, i386_THREAD_STATE, thread_state_t(&state), &count) )
|
||||
return false;
|
||||
ctx->ip = (void *)state.__eip;
|
||||
@@ -41,12 +41,12 @@ bool GetThreadBacktraceContext( uint64_t iID, BacktraceContext *ctx )
|
||||
#elif defined(__x86_64__)
|
||||
x86_thread_state64_t state;
|
||||
mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT;
|
||||
|
||||
|
||||
if (thread_get_state(thread, x86_THREAD_STATE64, thread_state_t(&state), &count))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ctx->ip = (void *)state.__rip;
|
||||
ctx->bp = (void *)state.__rbp;
|
||||
ctx->sp = (void *)state.__rsp;
|
||||
@@ -63,16 +63,16 @@ RString SetThreadPrecedence( float prec )
|
||||
thread_precedence_policy po = { integer_t( lrintf(prec * 63) ) };
|
||||
kern_return_t ret = thread_policy_set( mach_thread_self(), THREAD_PRECEDENCE_POLICY,
|
||||
(thread_policy_t)&po, THREAD_PRECEDENCE_POLICY_COUNT );
|
||||
|
||||
|
||||
if( ret != KERN_SUCCESS )
|
||||
return mach_error_string( ret );
|
||||
return RString();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (c) 2004-2006 Steve Checkoway
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -82,7 +82,7 @@ RString SetThreadPrecedence( float prec )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
- (id) initWithArgc:(int)argc argv:(char **)argv
|
||||
{
|
||||
[super init];
|
||||
self = [super init];
|
||||
if( argc == 2 && !strncmp(argv[1], "-psn_", 5) )
|
||||
argc = 1;
|
||||
m_iArgc = argc;
|
||||
|
||||
@@ -17,7 +17,9 @@ extern "C" int sm_main( int argc, char *argv[] );
|
||||
#define NO_GL_FLUSH
|
||||
|
||||
#define CPU_X86
|
||||
#ifndef BACKTRACE_METHOD_X86_DARWIN
|
||||
#define BACKTRACE_METHOD_X86_DARWIN
|
||||
#endif
|
||||
#define BACKTRACE_LOOKUP_METHOD_DLADDR
|
||||
|
||||
#ifndef MACOSX
|
||||
|
||||
@@ -441,7 +441,7 @@ static bool GetRegionInfo( mach_port_t self, const void *address, vm_address_t &
|
||||
mach_port_t unused;
|
||||
vm_size_t size = 0;
|
||||
vm_address_t start = vm_address_t( address );
|
||||
kern_return_t ret = vm_region( self, &start, &size, VM_REGION_BASIC_INFO_64,
|
||||
kern_return_t ret = vm_region_64( self, &start, &size, VM_REGION_BASIC_INFO_64,
|
||||
(vm_region_info_t)&info, &infoCnt, &unused );
|
||||
|
||||
if( ret != KERN_SUCCESS ||
|
||||
|
||||
@@ -9,7 +9,7 @@ struct Frame;
|
||||
/* This contains the information necessary to backtrace a thread. */
|
||||
struct BacktraceContext
|
||||
{
|
||||
#if defined(CPU_X86) || defined(CPU_X86_64)
|
||||
#if defined(CPU_X86) || defined(CPU_X86_64) || defined(__APPLE__)
|
||||
const void *ip, *bp, *sp;
|
||||
#endif
|
||||
|
||||
@@ -56,7 +56,7 @@ void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc );
|
||||
* @author Glenn Maynard (c) 2003-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -66,7 +66,7 @@ void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc );
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,424 +1,427 @@
|
||||
/* fix for MSVC ...evil! */
|
||||
#ifdef _MSC_VER
|
||||
#define CONST64(n) n ## ui64
|
||||
typedef unsigned __int64 ulong64;
|
||||
#else
|
||||
#define CONST64(n) n ## ULL
|
||||
typedef unsigned long long ulong64;
|
||||
#endif
|
||||
|
||||
/* this is the "32-bit at least" data type
|
||||
* Re-define it to suit your platform but it must be at least 32-bits
|
||||
*/
|
||||
#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__))
|
||||
typedef unsigned ulong32;
|
||||
#else
|
||||
typedef unsigned long ulong32;
|
||||
#endif
|
||||
|
||||
/* ---- HELPER MACROS ---- */
|
||||
#ifdef ENDIAN_NEUTRAL
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ x = ((unsigned long)((y)[3] & 255)<<24) | \
|
||||
((unsigned long)((y)[2] & 255)<<16) | \
|
||||
((unsigned long)((y)[1] & 255)<<8) | \
|
||||
((unsigned long)((y)[0] & 255)); }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ x = ((unsigned long)((y)[0] & 255)<<24) | \
|
||||
((unsigned long)((y)[1] & 255)<<16) | \
|
||||
((unsigned long)((y)[2] & 255)<<8) | \
|
||||
((unsigned long)((y)[3] & 255)); }
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \
|
||||
(((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#endif /* ENDIAN_NEUTRAL */
|
||||
|
||||
#ifdef ENDIAN_LITTLE
|
||||
|
||||
#if !defined(LTC_NO_BSWAP) && (defined(INTEL_CC) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__) || defined(__x86_64__))))
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"bswapl %0 \n\t" \
|
||||
"movl %0,(%1)\n\t" \
|
||||
"bswapl %0 \n\t" \
|
||||
::"r"(x), "r"(y));
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"movl (%1),%0\n\t" \
|
||||
"bswapl %0\n\t" \
|
||||
:"=r"(x): "r"(y));
|
||||
|
||||
#else
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ x = ((unsigned long)((y)[0] & 255)<<24) | \
|
||||
((unsigned long)((y)[1] & 255)<<16) | \
|
||||
((unsigned long)((y)[2] & 255)<<8) | \
|
||||
((unsigned long)((y)[3] & 255)); }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* x86_64 processor */
|
||||
#if !defined(LTC_NO_BSWAP) && (defined(__GNUC__) && defined(__x86_64__))
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"bswapq %0 \n\t" \
|
||||
"movq %0,(%1)\n\t" \
|
||||
"bswapq %0 \n\t" \
|
||||
::"r"(x), "r"(y));
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"movq (%1),%0\n\t" \
|
||||
"bswapq %0\n\t" \
|
||||
:"=r"(x): "r"(y));
|
||||
|
||||
#else
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \
|
||||
(((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENDIAN_32BITWORD
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
XMEMCPY(&(x), y, 4);
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#else /* 64-bit words then */
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ ulong64 __t = (x); XMEMCPY(y, &__t, 8); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ XMEMCPY(&(x), y, 8); }
|
||||
|
||||
#endif /* ENDIAN_64BITWORD */
|
||||
|
||||
#endif /* ENDIAN_LITTLE */
|
||||
|
||||
#ifdef ENDIAN_BIG
|
||||
#define STORE32L(x, y) \
|
||||
{ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ x = ((unsigned long)((y)[3] & 255)<<24) | \
|
||||
((unsigned long)((y)[2] & 255)<<16) | \
|
||||
((unsigned long)((y)[1] & 255)<<8) | \
|
||||
((unsigned long)((y)[0] & 255)); }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32) | \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16) | \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#ifdef ENDIAN_32BITWORD
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
XMEMCPY(&(x), y, 4);
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48)| \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32)| \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16)| \
|
||||
(((ulong64)((y)[6] & 255))<<8)| (((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#else /* 64-bit words then */
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; }
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ ulong64 __t = (x); XMEMCPY(y, &__t, 8); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ XMEMCPY(&(x), y, 8); }
|
||||
|
||||
#endif /* ENDIAN_64BITWORD */
|
||||
#endif /* ENDIAN_BIG */
|
||||
|
||||
#define BSWAP(x) ( ((x>>24)&0x000000FFUL) | ((x<<24)&0xFF000000UL) | \
|
||||
((x>>8)&0x0000FF00UL) | ((x<<8)&0x00FF0000UL) )
|
||||
|
||||
|
||||
/* 32-bit Rotates */
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
/* instrinsic rotate */
|
||||
#include <stdlib.h>
|
||||
#pragma intrinsic(_lrotr,_lrotl)
|
||||
#define ROR(x,n) _lrotr(x,n)
|
||||
#define ROL(x,n) _lrotl(x,n)
|
||||
#define RORc(x,n) _lrotr(x,n)
|
||||
#define ROLc(x,n) _lrotl(x,n)
|
||||
|
||||
#elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROL(unsigned word, int i)
|
||||
{
|
||||
asm ("roll %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROR(unsigned word, int i)
|
||||
{
|
||||
asm ("rorl %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROLc(unsigned word, const int i)
|
||||
{
|
||||
asm ("roll %2,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned RORc(unsigned word, const int i)
|
||||
{
|
||||
asm ("rorl %2,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ROLc ROL
|
||||
#define RORc ROR
|
||||
|
||||
#endif
|
||||
|
||||
#elif !defined(__STRICT_ANSI__) && defined(LTC_PPC32)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROL(unsigned word, int i)
|
||||
{
|
||||
asm ("rotlw %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"r" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROR(unsigned word, int i)
|
||||
{
|
||||
asm ("rotlw %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"r" (32-i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROLc(unsigned word, const int i)
|
||||
{
|
||||
asm ("rotlwi %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned RORc(unsigned word, const int i)
|
||||
{
|
||||
asm ("rotrwi %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ROLc ROL
|
||||
#define RORc ROR
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* rotates the hard way */
|
||||
#define ROL(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define ROR(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define ROLc(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* 64-bit Rotates */
|
||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROL64(unsigned long word, int i)
|
||||
{
|
||||
asm("rolq %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROR64(unsigned long word, int i)
|
||||
{
|
||||
asm("rorq %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROL64c(unsigned long word, const int i)
|
||||
{
|
||||
asm("rolq %2,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"J" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROR64c(unsigned long word, const int i)
|
||||
{
|
||||
asm("rorq %2,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"J" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#else /* LTC_NO_ROLC */
|
||||
|
||||
#define ROL64c ROL64
|
||||
#define ROR64c ROR64
|
||||
|
||||
#endif
|
||||
|
||||
#else /* Not x86_64 */
|
||||
|
||||
#define ROL64(x, y) \
|
||||
( (((x)<<((ulong64)(y)&63)) | \
|
||||
(((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROR64(x, y) \
|
||||
( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \
|
||||
((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROL64c(x, y) \
|
||||
( (((x)<<((ulong64)(y)&63)) | \
|
||||
(((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROR64c(x, y) \
|
||||
( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \
|
||||
((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x, y) ( ((x)>(y))?(x):(y) )
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(x, y) ( ((x)<(y))?(x):(y) )
|
||||
#endif
|
||||
|
||||
/* extract a byte portably */
|
||||
#ifdef _MSC_VER
|
||||
#define byte(x, n) ((unsigned char)((x) >> (8 * (n))))
|
||||
#else
|
||||
#define byte(x, n) (((x) >> (8 * (n))) & 255)
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision: 26244 $ */
|
||||
/* $Date: 2007-05-10 13:35:24 -0500 (Thu, 10 May 2007) $ */
|
||||
/* fix for MSVC ...evil! */
|
||||
#ifdef _MSC_VER
|
||||
#define CONST64(n) n ## ui64
|
||||
typedef unsigned __int64 ulong64;
|
||||
#else
|
||||
#define CONST64(n) n ## ULL
|
||||
typedef unsigned long long ulong64;
|
||||
#endif
|
||||
|
||||
/* this is the "32-bit at least" data type
|
||||
* Re-define it to suit your platform but it must be at least 32-bits
|
||||
*/
|
||||
#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__))
|
||||
typedef unsigned ulong32;
|
||||
#else
|
||||
typedef unsigned long ulong32;
|
||||
#endif
|
||||
|
||||
/* ---- HELPER MACROS ---- */
|
||||
#ifdef ENDIAN_NEUTRAL
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ x = ((unsigned long)((y)[3] & 255)<<24) | \
|
||||
((unsigned long)((y)[2] & 255)<<16) | \
|
||||
((unsigned long)((y)[1] & 255)<<8) | \
|
||||
((unsigned long)((y)[0] & 255)); }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ x = ((unsigned long)((y)[0] & 255)<<24) | \
|
||||
((unsigned long)((y)[1] & 255)<<16) | \
|
||||
((unsigned long)((y)[2] & 255)<<8) | \
|
||||
((unsigned long)((y)[3] & 255)); }
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \
|
||||
(((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#endif /* ENDIAN_NEUTRAL */
|
||||
|
||||
#ifdef ENDIAN_LITTLE
|
||||
|
||||
#if !defined(LTC_NO_BSWAP) && (defined(INTEL_CC) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__) || defined(__x86_64__))))
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"bswapl %0 \n\t" \
|
||||
"movl %0,(%1)\n\t" \
|
||||
"bswapl %0 \n\t" \
|
||||
::"r"(x), "r"(y));
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"movl (%1),%0\n\t" \
|
||||
"bswapl %0\n\t" \
|
||||
:"=r"(x): "r"(y));
|
||||
|
||||
#else
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ x = ((unsigned long)((y)[0] & 255)<<24) | \
|
||||
((unsigned long)((y)[1] & 255)<<16) | \
|
||||
((unsigned long)((y)[2] & 255)<<8) | \
|
||||
((unsigned long)((y)[3] & 255)); }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* x86_64 processor */
|
||||
#if !defined(LTC_NO_BSWAP) && (defined(__GNUC__) && defined(__x86_64__))
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"bswapq %0 \n\t" \
|
||||
"movq %0,(%1)\n\t" \
|
||||
"bswapq %0 \n\t" \
|
||||
::"r"(x), "r"(y));
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
asm __volatile__ ( \
|
||||
"movq (%1),%0\n\t" \
|
||||
"bswapq %0\n\t" \
|
||||
:"=r"(x): "r"(y));
|
||||
|
||||
#else
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \
|
||||
(((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENDIAN_32BITWORD
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
XMEMCPY(&(x), y, 4);
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#else /* 64-bit words then */
|
||||
|
||||
#define STORE32L(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ ulong64 __t = (x); XMEMCPY(y, &__t, 8); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ XMEMCPY(&(x), y, 8); }
|
||||
|
||||
#endif /* ENDIAN_64BITWORD */
|
||||
|
||||
#endif /* ENDIAN_LITTLE */
|
||||
|
||||
#ifdef ENDIAN_BIG
|
||||
#define STORE32L(x, y) \
|
||||
{ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD32L(x, y) \
|
||||
{ x = ((unsigned long)((y)[3] & 255)<<24) | \
|
||||
((unsigned long)((y)[2] & 255)<<16) | \
|
||||
((unsigned long)((y)[1] & 255)<<8) | \
|
||||
((unsigned long)((y)[0] & 255)); }
|
||||
|
||||
#define STORE64L(x, y) \
|
||||
{ (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64L(x, y) \
|
||||
{ x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \
|
||||
(((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32) | \
|
||||
(((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16) | \
|
||||
(((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); }
|
||||
|
||||
#ifdef ENDIAN_32BITWORD
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
XMEMCPY(&(x), y, 4);
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \
|
||||
(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \
|
||||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48)| \
|
||||
(((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32)| \
|
||||
(((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16)| \
|
||||
(((ulong64)((y)[6] & 255))<<8)| (((ulong64)((y)[7] & 255))); }
|
||||
|
||||
#else /* 64-bit words then */
|
||||
|
||||
#define STORE32H(x, y) \
|
||||
{ ulong32 __t = (x); XMEMCPY(y, &__t, 4); }
|
||||
|
||||
#define LOAD32H(x, y) \
|
||||
{ XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; }
|
||||
|
||||
#define STORE64H(x, y) \
|
||||
{ ulong64 __t = (x); XMEMCPY(y, &__t, 8); }
|
||||
|
||||
#define LOAD64H(x, y) \
|
||||
{ XMEMCPY(&(x), y, 8); }
|
||||
|
||||
#endif /* ENDIAN_64BITWORD */
|
||||
#endif /* ENDIAN_BIG */
|
||||
|
||||
#define BSWAP(x) ( ((x>>24)&0x000000FFUL) | ((x<<24)&0xFF000000UL) | \
|
||||
((x>>8)&0x0000FF00UL) | ((x<<8)&0x00FF0000UL) )
|
||||
|
||||
|
||||
/* 32-bit Rotates */
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
/* instrinsic rotate */
|
||||
#include <stdlib.h>
|
||||
#pragma intrinsic(_lrotr,_lrotl)
|
||||
#define ROR(x,n) _lrotr(x,n)
|
||||
#define ROL(x,n) _lrotl(x,n)
|
||||
#define RORc(x,n) _lrotr(x,n)
|
||||
#define ROLc(x,n) _lrotl(x,n)
|
||||
|
||||
#elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROL(unsigned word, int i)
|
||||
{
|
||||
asm ("roll %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROR(unsigned word, int i)
|
||||
{
|
||||
asm ("rorl %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
#define ROLc(word,i) ({ \
|
||||
ulong32 __ROLc_tmp = word; \
|
||||
__asm__ ("roll %2, %0" : \
|
||||
"=r" (__ROLc_tmp) : \
|
||||
"0" (__ROLc_tmp), \
|
||||
"I" (i)); \
|
||||
__ROLc_tmp; \
|
||||
})
|
||||
#define RORc(word,i) ({ \
|
||||
ulong32 __RORc_tmp = word; \
|
||||
__asm__ ("rorl %2, %0" : \
|
||||
"=r" (__RORc_tmp) : \
|
||||
"0" (__RORc_tmp), \
|
||||
"I" (i)); \
|
||||
__RORc_tmp; \
|
||||
})
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define ROLc ROL
|
||||
#define RORc ROR
|
||||
|
||||
#endif
|
||||
|
||||
#elif !defined(__STRICT_ANSI__) && defined(LTC_PPC32)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROL(unsigned word, int i)
|
||||
{
|
||||
asm ("rotlw %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"r" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROR(unsigned word, int i)
|
||||
{
|
||||
asm ("rotlw %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"r" (32-i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned ROLc(unsigned word, const int i)
|
||||
{
|
||||
asm ("rotlwi %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned RORc(unsigned word, const int i)
|
||||
{
|
||||
asm ("rotrwi %0,%0,%2"
|
||||
:"=r" (word)
|
||||
:"0" (word),"I" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ROLc ROL
|
||||
#define RORc ROR
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* rotates the hard way */
|
||||
#define ROL(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define ROR(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define ROLc(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* 64-bit Rotates */
|
||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROL64(unsigned long word, int i)
|
||||
{
|
||||
asm("rolq %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned long ROR64(unsigned long word, int i)
|
||||
{
|
||||
asm("rorq %%cl,%0"
|
||||
:"=r" (word)
|
||||
:"0" (word),"c" (i));
|
||||
return word;
|
||||
}
|
||||
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
#define ROL64c(word,i) ({ \
|
||||
ulong64 __ROL64c_tmp = word; \
|
||||
__asm__ ("rolq %2, %0" : \
|
||||
"=r" (__ROL64c_tmp) : \
|
||||
"0" (__ROL64c_tmp), \
|
||||
"J" (i)); \
|
||||
__ROL64c_tmp; \
|
||||
})
|
||||
#define ROR64c(word,i) ({ \
|
||||
ulong64 __ROR64c_tmp = word; \
|
||||
__asm__ ("rorq %2, %0" : \
|
||||
"=r" (__ROR64c_tmp) : \
|
||||
"0" (__ROR64c_tmp), \
|
||||
"J" (i)); \
|
||||
__ROR64c_tmp; \
|
||||
})
|
||||
|
||||
#else /* LTC_NO_ROLC */
|
||||
|
||||
#define ROL64c ROL64
|
||||
#define ROR64c ROR64
|
||||
|
||||
#endif
|
||||
|
||||
#else /* Not x86_64 */
|
||||
|
||||
#define ROL64(x, y) \
|
||||
( (((x)<<((ulong64)(y)&63)) | \
|
||||
(((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROR64(x, y) \
|
||||
( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \
|
||||
((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROL64c(x, y) \
|
||||
( (((x)<<((ulong64)(y)&63)) | \
|
||||
(((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#define ROR64c(x, y) \
|
||||
( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \
|
||||
((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x, y) ( ((x)>(y))?(x):(y) )
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(x, y) ( ((x)<(y))?(x):(y) )
|
||||
#endif
|
||||
|
||||
/* extract a byte portably */
|
||||
#ifdef _MSC_VER
|
||||
#define byte(x, n) ((unsigned char)((x) >> (8 * (n))))
|
||||
#else
|
||||
#define byte(x, n) (((x) >> (8 * (n))) & 255)
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision: 26244 $ */
|
||||
/* $Date: 2007-05-10 13:35:24 -0500 (Thu, 10 May 2007) $ */
|
||||
|
||||
Reference in New Issue
Block a user