aboutsummaryrefslogtreecommitdiff
path: root/ports/libflac
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-04-27 03:15:17 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-04-30 16:00:29 -0700
commit827c893b8e8224ca7c02a0d674fa9dba626aedb8 (patch)
tree8a290a154ed5fae7b66756af11f8064d6a334d6a /ports/libflac
parent286c400417e323693cba8c6f04c1be7898cc0e75 (diff)
downloadvcpkg-827c893b8e8224ca7c02a0d674fa9dba626aedb8.tar.gz
vcpkg-827c893b8e8224ca7c02a0d674fa9dba626aedb8.zip
[sfml] Support Linux
Diffstat (limited to 'ports/libflac')
-rw-r--r--ports/libflac/CMakeLists.txt30
-rw-r--r--ports/libflac/CONTROL2
2 files changed, 20 insertions, 12 deletions
diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt
index 518419c4f..d6f01399a 100644
--- a/ports/libflac/CMakeLists.txt
+++ b/ports/libflac/CMakeLists.txt
@@ -7,15 +7,22 @@ if(NOT DEFINED LIBFLAC_ARCHITECTURE)
message(FATAL_ERROR "Target architecture not specified")
endif()
-file(GLOB LIBFLAC_SOURCES
- ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c
- ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c)
+file(GLOB LIBFLAC_SOURCES src/libFLAC/*.c)
-file(GLOB LIBFLACXX_SOURCES
- ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp)
+if(WIN32)
+ list(APPEND LIBFLAC_SOURCES src/share/win_utf8_io/win_utf8_io.c)
+else()
+ list(FILTER LIBFLAC_SOURCES EXCLUDE REGEX "windows[^/]*$")
+
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "#include <inttypes.h>")
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ add_definitions(-DHAVE_CONFIG_H)
+endif()
+
+file(GLOB LIBFLACXX_SOURCES src/libFLAC++/*.cpp)
-include_directories(${PROJECT_SOURCE_DIR}/include)
-include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include)
+include_directories(include)
+include_directories(src/libFLAC/include)
if(NOT LIBFLAC_ARCHITECTURE MATCHES arm)
add_definitions(-DFLAC__SSE_OS)
@@ -44,14 +51,15 @@ endif()
add_definitions(-DPACKAGE_VERSION="1.3.2")
add_definitions(-DFLAC__HAS_OGG)
add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary
+add_definitions(-DHAVE_LROUND)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
add_library(libFLAC ${LIBFLAC_SOURCES})
add_library(libFLACXX ${LIBFLACXX_SOURCES})
-set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac)
-set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++)
+set_target_properties(libFLAC PROPERTIES OUTPUT_NAME FLAC)
+set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME FLAC++)
find_library(OGG_LIBRARY ogg)
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
@@ -73,10 +81,10 @@ install(TARGETS libFLAC libFLACXX
LIBRARY DESTINATION lib)
if(NOT DEFINED LIBFLAC_SKIP_HEADERS)
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/
+ install(DIRECTORY include/FLAC/
DESTINATION include/FLAC
FILES_MATCHING PATTERN "*.h")
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/
+ install(DIRECTORY include/FLAC++/
DESTINATION include/FLAC++
FILES_MATCHING PATTERN "*.h")
endif()
diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL
index ca2995d68..1a16c7a6a 100644
--- a/ports/libflac/CONTROL
+++ b/ports/libflac/CONTROL
@@ -1,4 +1,4 @@
Source: libflac
-Version: 1.3.2-4
+Version: 1.3.2-5
Description: Library for manipulating FLAC files
Build-Depends: libogg