mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-07 07:30:02 +01:00
Further cmake changes for SoundTouchDLL compilation
- enable "-Ofast" compilation flags for cmake build - adjust compiler flags for the SoundTouchDLL compilation - add cmake-generated "SoundTouchDLL_EXPORTS" as alias for "DLL_EXPORT" - hide cmake temporary files in gitignore Signed-off-by: Olli <oparviai'at'iki.fi>
This commit is contained in:
parent
220eb7857c
commit
f974b28682
3
.gitignore
vendored
3
.gitignore
vendored
@ -49,3 +49,6 @@ source/android-lib/.externalNativeBuild
|
||||
|
||||
# CMake build directory
|
||||
build*
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
*.cmake
|
||||
|
||||
@ -30,7 +30,12 @@ if(SOUNDTOUCH_DLL)
|
||||
source/SoundTouchDLL/SoundTouchDLL.cpp
|
||||
source/SoundTouchDLL/SoundTouchDLL.rc
|
||||
)
|
||||
target_compile_options(SoundTouch PRIVATE -fPIC)
|
||||
set_target_properties(SoundTouchDLL PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
target_compile_options(SoundTouchDLL PRIVATE -Ofast)
|
||||
target_compile_definitions(SoundTouchDLL PRIVATE CMAKE)
|
||||
target_include_directories(SoundTouchDLL PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries(SoundTouchDLL PRIVATE SoundTouch)
|
||||
install(FILES source/SoundTouchDLL/SoundTouchDLL.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundtouch")
|
||||
install(TARGETS SoundTouchDLL EXPORT SoundTouchTargets)
|
||||
endif()
|
||||
@ -42,6 +47,7 @@ if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_options(SoundTouch PRIVATE -Ofast)
|
||||
target_compile_definitions(SoundTouch PRIVATE CMAKE)
|
||||
|
||||
option(INTEGER_SAMPLES "Use integers instead of floats for samples" OFF)
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
#else
|
||||
// GNU version
|
||||
|
||||
#ifdef DLL_EXPORTS
|
||||
#if defined(DLL_EXPORTS) || defined(SoundTouchDLL_EXPORTS)
|
||||
// GCC declaration for exporting functions
|
||||
#define SOUNDTOUCHDLL_API extern "C" __attribute__((__visibility__("default")))
|
||||
#else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user