Fix macOS build
This commit is contained in:
@@ -23,8 +23,6 @@ Contents/
|
||||
verdata.*
|
||||
ITGmania-debug
|
||||
itgmania-debug
|
||||
Xcode/Info.StepMania.plist
|
||||
Xcode/plistHelper.hpp
|
||||
src/version_updater/VersionUpdater
|
||||
src/generated
|
||||
extern/mad-0.15.1b/config.h
|
||||
|
||||
@@ -28,7 +28,7 @@ function(disable_project_warnings projectName)
|
||||
if(NOT WITH_EXTERNAL_WARNINGS)
|
||||
if(MSVC)
|
||||
target_compile_options(${projectName} PRIVATE "/W0")
|
||||
elseif(APPLE)
|
||||
elseif(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set_property(TARGET ${projectName} PROPERTY XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
|
||||
else()
|
||||
target_compile_options(${projectName} PRIVATE "-w")
|
||||
|
||||
@@ -30,7 +30,8 @@ list(APPEND FFMPEG_CONFIGURE
|
||||
"--disable-postproc"
|
||||
"--disable-avfilter"
|
||||
"--disable-shared"
|
||||
"--enable-static")
|
||||
"--enable-static"
|
||||
"--prefix=/")
|
||||
|
||||
if(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
list(APPEND FFMPEG_CONFIGURE "--enable-pic")
|
||||
@@ -40,6 +41,7 @@ if(MACOSX)
|
||||
find_program(FFMPEG_YASM_EXECUTABLE yasm
|
||||
PATHS /usr/bin /usr/local/bin /opt/local/bin)
|
||||
list(APPEND FFMPEG_CONFIGURE "--yasmexe=${FFMPEG_YASM_EXECUTABLE}")
|
||||
list(APPEND FFMPEG_CONFIGURE "--disable-asm")
|
||||
endif()
|
||||
|
||||
if(WITH_GPL_LIBS)
|
||||
@@ -58,6 +60,7 @@ list(APPEND SM_FFMPEG_MAKE $(MAKE))
|
||||
if(WITH_FFMPEG_JOBS GREATER 0)
|
||||
list(APPEND SM_FFMPEG_MAKE "-j${WITH_FFMPEG_JOBS}")
|
||||
endif()
|
||||
list(APPEND SM_FFMPEG_MAKE "&&" "make" "DESTDIR=./dest" "install")
|
||||
|
||||
if(IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
externalproject_add("ffmpeg"
|
||||
@@ -98,4 +101,5 @@ else()
|
||||
endif()
|
||||
|
||||
externalproject_get_property("ffmpeg" BINARY_DIR)
|
||||
set(SM_FFMPEG_ROOT ${BINARY_DIR})
|
||||
set(SM_FFMPEG_LIB ${BINARY_DIR}/dest/lib)
|
||||
set(SM_FFMPEG_INCLUDE ${BINARY_DIR}/dest/include)
|
||||
|
||||
@@ -22,21 +22,18 @@ set(SM_EXE_NAME "ITGmania")
|
||||
# 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()
|
||||
|
||||
@@ -28,29 +28,29 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@SM_EXE_NAME@</string>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@SM_EXE_NAME@ @SM_VERSION_TRADITIONAL@</string>
|
||||
<string>${SM_EXE_NAME} ${SM_VERSION_TRADITIONAL}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>smicon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.@SM_EXE_NAME@-@SM_VERSION_MAJOR@</string>
|
||||
<string>com.${SM_EXE_NAME}-${SM_VERSION_MAJOR}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@SM_EXE_NAME@</string>
|
||||
<string>${SM_EXE_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SM_VERSION_TRADITIONAL@</string>
|
||||
<string>${SM_VERSION_TRADITIONAL}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Step</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@SM_VERSION_TRADITIONAL@</string>
|
||||
<string>${SM_VERSION_TRADITIONAL}</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.music-games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>@CMAKE_OSX_DEPLOYMENT_TARGET_FULL@</string>
|
||||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET_FULL}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2001-2015</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
Binary file not shown.
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Libraries</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.carbonframeworktemplate</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OGG_</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.11</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
Static Libraries:
|
||||
jpeg-6b
|
||||
libogg-1.1.2
|
||||
libpng-1.5.1
|
||||
libvorbis-1.1.1
|
||||
libtheora-1.0alpha5
|
||||
zlib-1.2.3
|
||||
ffmpeg-r8448
|
||||
|
||||
Directions:
|
||||
1. Decompress all of those in the Libraries directory.
|
||||
2a. Get ffmpeg via
|
||||
svn co -r 8448 svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpeg
|
||||
2b. Run guard-ffmpeg.sh
|
||||
2c. Copy ffmpeg-config.h to ffmpeg/config.h
|
||||
2d. Run version.sh in ffmpeg
|
||||
2e. Patch ffmpeg with
|
||||
http://stepmania.sourceforge.net/ffmpeg-r8448-avi.patch
|
||||
3. Open Libraries.xcode and build target all.
|
||||
4. Copy the static libraries to stepmania/PBProject/Libraries
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>ffmpeg</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.MySoftwareCompany.ffmpeg</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>STEP</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>r8448</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>ffmpeg</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.MySoftwareCompany.ffmpeg</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>STEP</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.4.9-pre1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in ffmpeg/libavcodec/ppc/*.[hc] \
|
||||
ffmpeg/libswscale/yuv2rgb_altivec.c; do
|
||||
sed -i '' -e '1i\
|
||||
#ifdef __ppc__
|
||||
$a\
|
||||
#endif' $i
|
||||
done
|
||||
for i in ffmpeg/libavcodec/i386/*.[hc]; do
|
||||
sed -i '' -e '1i\
|
||||
#ifdef __i386__
|
||||
$a\
|
||||
#endif' $i
|
||||
done
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>mad</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>mad</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.15.1b</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>38</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>CarbonProjectTemplates</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>140000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.usb</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,10 +0,0 @@
|
||||
#if defined(DEBUG)
|
||||
#define PRODUCT_NAME @SM_NAME_DEBUG@
|
||||
#elif defined(MINSIZEREL)
|
||||
#define PRODUCT_NAME @SM_NAME_MINSIZEREL@
|
||||
#elif defined(RELWITHDEBINFO)
|
||||
#define PRODUCT_NAME @SM_NAME_RELWITHDEBINFO@
|
||||
#else
|
||||
#define PRODUCT_NAME @SM_NAME_RELEASE@
|
||||
#endif
|
||||
|
||||
Vendored
-3
@@ -23,8 +23,5 @@ else()
|
||||
|
||||
if(MSVC)
|
||||
target_compile_definitions("jsoncpp" PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
elseif(APPLE)
|
||||
set_target_properties("jsoncpp" PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
target_compile_options("jsoncpp" PRIVATE "-stdlib=libc++")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Vendored
+3
@@ -42,6 +42,9 @@ else()
|
||||
|
||||
disable_project_warnings("png")
|
||||
|
||||
target_compile_definitions("png" PRIVATE PNG_ARM_NEON_OPT=0
|
||||
PNG_INTEL_SSE_OPT=0)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_definitions("png" PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
+35
-62
@@ -61,15 +61,8 @@ else()
|
||||
set(SM_NAME_RELWITHDEBINFO "itgmania-release-symbols")
|
||||
endif()
|
||||
|
||||
# Configure generated files here.
|
||||
configure_file("${SM_XCODE_DIR}/Info.plist.in.xml"
|
||||
"${SM_XCODE_DIR}/Info.StepMania.plist")
|
||||
configure_file("${SM_XCODE_DIR}/plistHelper.in.hpp"
|
||||
"${SM_XCODE_DIR}/plistHelper.hpp")
|
||||
|
||||
# TODO: Make this actually be data and not an executable.
|
||||
if(APPLE)
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${SM_EXE_NAME})
|
||||
add_executable("${SM_EXE_NAME}"
|
||||
MACOSX_BUNDLE
|
||||
${SMDATA_ALL_FILES_SRC}
|
||||
@@ -96,17 +89,22 @@ else()
|
||||
${SMDATA_ALL_FILES_HPP})
|
||||
endif()
|
||||
|
||||
set_property(TARGET "${SM_EXE_NAME}" PROPERTY CXX_STANDARD 11)
|
||||
set_property(TARGET "${SM_EXE_NAME}" PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
set_property(TARGET "${SM_EXE_NAME}" PROPERTY CXX_EXTENSIONS ON)
|
||||
|
||||
set_target_properties("${SM_EXE_NAME}"
|
||||
PROPERTIES OUTPUT_NAME
|
||||
"${SM_NAME_RELEASE}"
|
||||
RELEASE_OUTPUT_NAME
|
||||
"${SM_NAME_RELEASE}"
|
||||
DEBUG_OUTPUT_NAME
|
||||
"${SM_NAME_DEBUG}"
|
||||
MINSIZEREL_OUTPUT_NAME
|
||||
"${SM_NAME_MINSIZEREL}"
|
||||
RELWITHDEBINFO_OUTPUT_NAME
|
||||
"${SM_NAME_RELWITHDEBINFO}")
|
||||
PROPERTIES OUTPUT_NAME "${SM_NAME_RELEASE}"
|
||||
RELEASE_OUTPUT_NAME "${SM_NAME_RELEASE}"
|
||||
DEBUG_OUTPUT_NAME "${SM_NAME_DEBUG}"
|
||||
MINSIZEREL_OUTPUT_NAME "${SM_NAME_MINSIZEREL}"
|
||||
RELWITHDEBINFO_OUTPUT_NAME "${SM_NAME_RELWITHDEBINFO}")
|
||||
|
||||
if(WITH_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported()
|
||||
set_property(TARGET "${SM_EXE_NAME}" PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
|
||||
endif()
|
||||
|
||||
# Required for usage of tomcrypt and tommath.
|
||||
target_compile_definitions("${SM_EXE_NAME}" PRIVATE LTM_DESC)
|
||||
@@ -141,14 +139,6 @@ if(WITH_SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LTO)
|
||||
if(MSVC)
|
||||
set(SM_COMPILE_FLAGS "${SM_COMPILE_FLAGS} /GL")
|
||||
else()
|
||||
set(SM_COMPILE_FLAGS "${SM_COMPILE_FLAGS} -flto")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# TODO: Find a way to do this cleanly for non MSVC users.
|
||||
set(SM_COMPILE_FLAGS "${SM_COMPILE_FLAGS} /MP2")
|
||||
@@ -158,12 +148,9 @@ set_target_properties("${SM_EXE_NAME}"
|
||||
PROPERTIES COMPILE_FLAGS "${SM_COMPILE_FLAGS}")
|
||||
|
||||
set_target_properties("${SM_EXE_NAME}"
|
||||
PROPERTIES OUTPUT_NAME_DEBUG
|
||||
"${SM_NAME_DEBUG}"
|
||||
OUTPUT_NAME_MINSIZEREL
|
||||
"${SM_NAME_MINSIZEREL}"
|
||||
OUTPUT_NAME_RELWITHDEBINFO
|
||||
"${SM_NAME_RELWITHDEBINFO}")
|
||||
PROPERTIES OUTPUT_NAME_DEBUG "${SM_NAME_DEBUG}"
|
||||
OUTPUT_NAME_MINSIZEREL "${SM_NAME_MINSIZEREL}"
|
||||
OUTPUT_NAME_RELWITHDEBINFO "${SM_NAME_RELWITHDEBINFO}")
|
||||
|
||||
list(APPEND SM_WINDOWS_PROGRAM_DLLS
|
||||
"${SM_PROGRAM_DIR}/avcodec-55.dll"
|
||||
@@ -204,7 +191,6 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
target_compile_definitions("${SM_EXE_NAME}" PRIVATE BACKTRACE_METHOD_X86_DARWIN)
|
||||
target_compile_definitions("${SM_EXE_NAME}" PRIVATE MACOSX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -stdlib=libc++")
|
||||
set_target_properties(
|
||||
"${SM_EXE_NAME}"
|
||||
PROPERTIES
|
||||
@@ -219,13 +205,7 @@ elseif(APPLE)
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO
|
||||
"${SM_ROOT_DIR}"
|
||||
MACOSX_BUNDLE_INFO_PLIST
|
||||
"${SM_XCODE_DIR}/Info.StepMania.plist"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD
|
||||
"${SM_CPP_STANDARD}"
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY
|
||||
"libc++"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_FILE
|
||||
"${SM_XCODE_DIR}/Info.StepMania.plist"
|
||||
"${SM_XCODE_DIR}/Info.plist.in"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_PREPROCESS
|
||||
"YES"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_PREPROCESSOR_DEFINITIONS[variant=Release]
|
||||
@@ -236,17 +216,11 @@ elseif(APPLE)
|
||||
"MINSIZEREL"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_PREPROCESSOR_DEFINITIONS[variant=RelWithDebInfo]
|
||||
"RELWITHDEBINFO"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_PREFIX_HEADER
|
||||
"${SM_XCODE_DIR}/plistHelper.hpp"
|
||||
XCODE_ATTRIBUTE_GCC_PREFIX_HEADER
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/archutils/Darwin/StepMania.pch"
|
||||
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS
|
||||
"NO"
|
||||
XCODE_ATTRIBUTE_LIBRARY_SEARCH_PATHS
|
||||
"${SM_XCODE_DIR}/Libraries")
|
||||
# XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS
|
||||
# "${SM_XCODE_DIR}/StepMania.entitlements")
|
||||
|
||||
"NO")
|
||||
|
||||
set(APPLE_BUNDLE_RESOURCES
|
||||
"${SM_ROOT_DIR}/Announcers"
|
||||
"${SM_ROOT_DIR}/BackgroundEffects"
|
||||
@@ -270,15 +244,16 @@ elseif(APPLE)
|
||||
target_compile_definitions("${SM_EXE_NAME}" PRIVATE HAVE_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(SM_APP_RELEASE_NAME "${SM_NAME_DEBUG}")
|
||||
elseif(CMAKE_BUILD_TYPE EQUAL "MinSizeRel")
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
|
||||
set(SM_APP_RELEASE_NAME "${SM_NAME_MINSIZEREL}")
|
||||
elseif(CMAKE_BUILD_TYPE EQUAL "RelWithDebInfo")
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
set(SM_APP_RELEASE_NAME "${SM_NAME_RELWITHDEBINFO}")
|
||||
else()
|
||||
set(SM_APP_RELEASE_NAME "${SM_NAME_RELEASE}")
|
||||
endif()
|
||||
|
||||
if(WITH_FULL_RELEASE)
|
||||
string(CONCAT SM_NAME_VERSION
|
||||
"${SM_EXE_NAME}"
|
||||
@@ -408,8 +383,6 @@ else() # Linux
|
||||
if("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
target_compile_definitions("${SM_EXE_NAME}" PRIVATE LINUX)
|
||||
endif()
|
||||
|
||||
target_compile_options("${SM_EXE_NAME}" PRIVATE "-std=${SM_CPP_STANDARD}")
|
||||
endif()
|
||||
|
||||
set_property(TARGET "${SM_EXE_NAME}" PROPERTY FOLDER "Internal Libraries")
|
||||
@@ -546,10 +519,10 @@ elseif(APPLE)
|
||||
|
||||
if(HAS_FFMPEG)
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_FFMPEG_ROOT}/libavformat/libavformat.a"
|
||||
"${SM_FFMPEG_ROOT}/libavcodec/libavcodec.a"
|
||||
"${SM_FFMPEG_ROOT}/libswscale/libswscale.a"
|
||||
"${SM_FFMPEG_ROOT}/libavutil/libavutil.a")
|
||||
"${SM_FFMPEG_LIB}/libavformat.a"
|
||||
"${SM_FFMPEG_LIB}/libavcodec.a"
|
||||
"${SM_FFMPEG_LIB}/libswscale.a"
|
||||
"${SM_FFMPEG_LIB}/libavutil.a")
|
||||
endif()
|
||||
else() # Unix / Linux TODO: Remember to find and locate the zip archive files.
|
||||
if(HAS_FFMPEG)
|
||||
@@ -561,10 +534,10 @@ else() # Unix / Linux TODO: Remember to find and locate the zip archive files.
|
||||
"${FFMPEG_avutil_LIBRARY}")
|
||||
else()
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_FFMPEG_ROOT}/libavformat/libavformat.a"
|
||||
"${SM_FFMPEG_ROOT}/libavcodec/libavcodec.a"
|
||||
"${SM_FFMPEG_ROOT}/libswscale/libswscale.a"
|
||||
"${SM_FFMPEG_ROOT}/libavutil/libavutil.a")
|
||||
"${SM_FFMPEG_LIB}/libavformat.a"
|
||||
"${SM_FFMPEG_LIB}/libavcodec.a"
|
||||
"${SM_FFMPEG_LIB}/libswscale.a"
|
||||
"${SM_FFMPEG_LIB}/libavutil.a")
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_ZLIB)
|
||||
@@ -672,7 +645,7 @@ if(NOT APPLE)
|
||||
list(APPEND SM_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIR}")
|
||||
else()
|
||||
add_dependencies("${SM_EXE_NAME}" "ffmpeg")
|
||||
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_SRC_DIR}" "${SM_FFMPEG_ROOT}")
|
||||
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}")
|
||||
endif()
|
||||
endif()
|
||||
if(HAS_GTK3)
|
||||
@@ -696,7 +669,7 @@ else()
|
||||
list(APPEND SM_INCLUDE_DIRS "archutils/Unix")
|
||||
if(HAS_FFMPEG)
|
||||
add_dependencies("${SM_EXE_NAME}" "ffmpeg")
|
||||
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_SRC_DIR}" "${SM_FFMPEG_ROOT}")
|
||||
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user