cmake: remove cmake from 3rdparty

3rdparty have been deprecated since a long time on linux.

Files are likely wrong
This commit is contained in:
Gregory Hainaut 2014-12-15 19:17:23 +01:00
parent 4f957feacd
commit 532cc7755c
7 changed files with 0 additions and 937 deletions

View File

@ -1,8 +0,0 @@
# Check that people use the good file
if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
### 3rd party was dropped

View File

@ -1,55 +0,0 @@
# bzip2 library
# library name
set(Output pcsx2_bzip2)
set(CommonFlags
-march=athlon-xp
-march=prescott
)
set(OptimizationFlags
-Os
-W
)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(${CommonFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(bzip2Sources
blocksort.c
bzlib.c
compress.c
crctable.c
decompress.c
huffman.c
randtable.c)
# variable with all headers of this library
set(bzip2Headers
bzlib.h
bzlib_private.h)
# add library
add_library(${Output} STATIC ${bzip2Sources} ${bzip2Headers})
# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

View File

@ -1,349 +0,0 @@
# $Id: $
#
# For a "How-To" please refer to the Portaudio documentation at:
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/CMake
#
PROJECT( portaudio )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
OPTION(PA_CONFIG_LIB_OUTPUT_PATH "Make sure that output paths are kept neat" OFF)
IF(CMAKE_CL_64)
SET(TARGET_POSTFIX x64)
IF(PA_CONFIG_LIB_OUTPUT_PATH)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/x64)
ENDIF(PA_CONFIG_LIB_OUTPUT_PATH)
ELSE(CMAKE_CL_64)
SET(TARGET_POSTFIX x86)
IF(PA_CONFIG_LIB_OUTPUT_PATH)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/Win32)
ENDIF(PA_CONFIG_LIB_OUTPUT_PATH)
ENDIF(CMAKE_CL_64)
OPTION(PA_ENABLE_DEBUG_OUTPUT "Enable debug output for Portaudio" OFF)
IF(PA_ENABLE_DEBUG_OUTPUT)
ADD_DEFINITIONS(-DPA_ENABLE_DEBUG_OUTPUT)
ENDIF(PA_ENABLE_DEBUG_OUTPUT)
IF(WIN32 AND MSVC)
OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON)
IF(PA_DLL_LINK_WITH_STATIC_RUNTIME)
FOREACH(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
IF(${flag_var} MATCHES "/MD")
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
ENDIF(PA_DLL_LINK_WITH_STATIC_RUNTIME)
ENDIF(WIN32 AND MSVC)
IF(WIN32)
OPTION(PA_UNICODE_BUILD "Enable Portaudio Unicode build" ON)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_support)
# Try to find DirectX SDK
FIND_PACKAGE(DXSDK)
# Try to find ASIO SDK (assumes that portaudio and asiosdk folders are side-by-side, see
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC)
FIND_PACKAGE(ASIOSDK)
IF(ASIOSDK_FOUND)
OPTION(PA_USE_ASIO "Enable support for ASIO" ON)
ELSE(ASIOSDK_FOUND)
OPTION(PA_USE_ASIO "Enable support for ASIO" OFF)
ENDIF(ASIOSDK_FOUND)
IF(DXSDK_FOUND)
OPTION(PA_USE_DS "Enable support for DirectSound" ON)
ELSE(DXSDK_FOUND)
OPTION(PA_USE_DS "Enable support for DirectSound" OFF)
ENDIF(DXSDK_FOUND)
OPTION(PA_USE_WMME "Enable support for MME" ON)
OPTION(PA_USE_WASAPI "Enable support for WASAPI" ON)
OPTION(PA_USE_WDMKS "Enable support for WDMKS" ON)
OPTION(PA_USE_WDMKS_DEVICE_INFO "Use WDM/KS API for device info" ON)
MARK_AS_ADVANCED(PA_USE_WDMKS_DEVICE_INFO)
IF(PA_USE_DS)
OPTION(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE "Use DirectSound full duplex create" ON)
MARK_AS_ADVANCED(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ENDIF(PA_USE_DS)
ENDIF(WIN32)
# Set variables for DEF file expansion
IF(NOT PA_USE_ASIO)
SET(DEF_EXCLUDE_ASIO_SYMBOLS ";")
ENDIF(NOT PA_USE_ASIO)
IF(NOT PA_USE_WASAPI)
SET(DEF_EXCLUDE_WASAPI_SYMBOLS ";")
ENDIF(NOT PA_USE_WASAPI)
IF(PA_USE_WDMKS_DEVICE_INFO)
ADD_DEFINITIONS(-DPAWIN_USE_WDMKS_DEVICE_INFO)
ENDIF(PA_USE_WDMKS_DEVICE_INFO)
IF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ADD_DEFINITIONS(-DPAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ENDIF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
#######################################
IF(WIN32)
INCLUDE_DIRECTORIES(src/os/win)
ENDIF(WIN32)
IF(PA_USE_ASIO)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/common)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/host)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/host/pc)
SET(PA_ASIO_INCLUDES
include/pa_asio.h
)
SET(PA_ASIO_SOURCES
src/hostapi/asio/pa_asio.cpp
)
SET(PA_ASIOSDK_SOURCES
${ASIOSDK_ROOT_DIR}/common/asio.cpp
${ASIOSDK_ROOT_DIR}/host/pc/asiolist.cpp
${ASIOSDK_ROOT_DIR}/host/asiodrivers.cpp
)
SOURCE_GROUP("hostapi\\ASIO" FILES
${PA_ASIO_SOURCES}
)
SOURCE_GROUP("hostapi\\ASIO\\ASIOSDK" FILES
${PA_ASIOSDK_SOURCES}
)
ENDIF(PA_USE_ASIO)
IF(PA_USE_DS)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
INCLUDE_DIRECTORIES(src/os/win)
SET(PA_DS_INCLUDES
include/pa_win_ds.h
src/hostapi/dsound/pa_win_ds_dynlink.h
)
SET(PA_DS_SOURCES
src/hostapi/dsound/pa_win_ds.c
src/hostapi/dsound/pa_win_ds_dynlink.c
)
SOURCE_GROUP("hostapi\\dsound" FILES
${PA_DS_INCLUDES}
${PA_DS_SOURCES}
)
ENDIF(PA_USE_DS)
IF(PA_USE_WMME)
SET(PA_WMME_INCLUDES
include/pa_win_wmme.h
)
SET(PA_WMME_SOURCES
src/hostapi/wmme/pa_win_wmme.c
)
SOURCE_GROUP("hostapi\\wmme" FILES
${PA_WMME_SOURCES}
)
ENDIF(PA_USE_WMME)
IF(PA_USE_WASAPI)
SET(PA_WASAPI_INCLUDES
include/pa_win_wasapi.h
)
SET(PA_WASAPI_SOURCES
src/hostapi/wasapi/pa_win_wasapi.c
)
SOURCE_GROUP("hostapi\\wasapi" FILES
${PA_WASAPI_SOURCES}
)
ENDIF(PA_USE_WASAPI)
IF(PA_USE_WDMKS)
SET(PA_WDMKS_INCLUDES
include/pa_win_wdmks.h
)
SET(PA_WDMKS_SOURCES
src/hostapi/wdmks/pa_win_wdmks.c
)
SOURCE_GROUP("hostapi\\wdmks" FILES
${PA_WDMKS_SOURCES}
)
ENDIF(PA_USE_WDMKS)
SET(PA_SKELETON_SOURCES
src/hostapi/skeleton/pa_hostapi_skeleton.c
)
SOURCE_GROUP("hostapi\\skeleton"
${PA_SKELETON_SOURCES})
#######################################
IF(WIN32)
SET(PA_INCLUDES
include/portaudio.h
${PA_ASIO_INCLUDES}
${PA_DS_INCLUDES}
${PA_WMME_INCLUDES}
${PA_WASAPI_INCLUDES}
${PA_WDMKS_INCLUDES}
)
ENDIF(WIN32)
SOURCE_GROUP("include" FILES
${PA_INCLUDES}
)
SET(PA_COMMON_INCLUDES
src/common/pa_allocation.h
src/common/pa_converters.h
src/common/pa_cpuload.h
src/common/pa_debugprint.h
src/common/pa_dither.h
src/common/pa_endianness.h
src/common/pa_hostapi.h
src/common/pa_memorybarrier.h
src/common/pa_process.h
src/common/pa_ringbuffer.h
src/common/pa_stream.h
src/common/pa_trace.h
src/common/pa_types.h
src/common/pa_util.h
)
SET(PA_COMMON_SOURCES
src/common/pa_allocation.c
src/common/pa_converters.c
src/common/pa_cpuload.c
src/common/pa_debugprint.c
src/common/pa_dither.c
src/common/pa_front.c
src/common/pa_process.c
src/common/pa_ringbuffer.c
src/common/pa_stream.c
src/common/pa_trace.c
)
SOURCE_GROUP("common" FILES
${PA_COMMON_INCLUDES}
${PA_COMMON_SOURCES}
)
SOURCE_GROUP("cmake_generated" FILES
${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
IF(WIN32)
SET(PA_PLATFORM_SOURCES
src/os/win/pa_win_hostapis.c
src/os/win/pa_win_util.c
src/os/win/pa_win_waveformat.c
src/os/win/pa_win_wdmks_utils.c
src/os/win/pa_win_coinitialize.c
src/os/win/pa_x86_plain_converters.c
)
SOURCE_GROUP("os\\win" FILES
${PA_PLATFORM_SOURCES}
)
ENDIF(WIN32)
INCLUDE_DIRECTORIES( include )
INCLUDE_DIRECTORIES( src/common )
IF(WIN32 AND MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(WIN32 AND MSVC)
ADD_DEFINITIONS(-DPORTAUDIO_CMAKE_GENERATED)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
SET(SOURCES_LESS_ASIO_SDK
${PA_COMMON_SOURCES}
${PA_ASIO_SOURCES}
${PA_DS_SOURCES}
${PA_WMME_SOURCES}
${PA_WASAPI_SOURCES}
${PA_WDMKS_SOURCES}
${PA_SKELETON_SOURCES}
${PA_PLATFORM_SOURCES}
)
IF(PA_UNICODE_BUILD)
SET_SOURCE_FILES_PROPERTIES(
${SOURCES_LESS_ASIO_SDK}
PROPERTIES
COMPILE_DEFINITIONS "UNICODE;_UNICODE"
)
ENDIF(PA_UNICODE_BUILD)
ADD_LIBRARY(portaudio SHARED
${PA_INCLUDES}
${PA_COMMON_INCLUDES}
${SOURCES_LESS_ASIO_SDK}
${PA_ASIOSDK_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
ADD_LIBRARY(portaudio_static STATIC
${PA_INCLUDES}
${PA_COMMON_INCLUDES}
${SOURCES_LESS_ASIO_SDK}
${PA_ASIOSDK_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
# Configure the exports file according to settings
SET(GENERATED_MESSAGE "CMake generated file, do NOT edit! Use CMake-GUI to change configuration instead.")
CONFIGURE_FILE( cmake_support/template_portaudio.def ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def @ONLY )
# Configure header for options (PA_USE_xxx)
CONFIGURE_FILE( cmake_support/options_cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h @ONLY )
IF(WIN32)
# If we use DirectSound, we need this for the library to be found (if not in VS project settings)
IF(PA_USE_DS AND DXSDK_FOUND)
TARGET_LINK_LIBRARIES(portaudio ${DXSDK_DSOUND_LIBRARY})
ENDIF(PA_USE_DS AND DXSDK_FOUND)
# If we use WDM/KS we need setupapi.lib
IF(PA_USE_WDMKS)
TARGET_LINK_LIBRARIES(portaudio setupapi)
ENDIF(PA_USE_WDMKS)
SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX})
SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX})
ENDIF(WIN32)
OPTION(PA_BUILD_TESTS "Include test projects" OFF)
OPTION(PA_BUILD_EXAMPLES "Include example projects" OFF)
# Prepared for inclusion of test files
IF(PA_BUILD_TESTS)
SUBDIRS(test)
ENDIF(PA_BUILD_TESTS)
# Prepared for inclusion of test files
IF(PA_BUILD_EXAMPLES)
SUBDIRS(examples)
ENDIF(PA_BUILD_EXAMPLES)
#################################

View File

@ -1,67 +0,0 @@
# SoundTouch library
# library name
set(Output pcsx2_SoundTouch)
set(CommonFlags
-march=athlon-xp
-march=prescott
)
set(OptimizationFlags
-Os
-W
)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(${CommonFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(SoundTouchSources
AAFilter.cpp
FIFOSampleBuffer.cpp
FIRFilter.cpp
RateTransposer.cpp
SoundTouch.cpp
TDStretch.cpp
# WavFile.cpp # directly include in spu2x
cpu_detect_x86_gcc.cpp
mmx_optimized.cpp
sse_optimized.cpp)
# variable with all headers of this library
set(SoundTouchHeaders
AAFilter.h
BPMDetect.h
FIFOSampleBuffer.h
FIFOSamplePipe.h
FIRFilter.h
RateTransposer.h
STTypes.h
SoundTouch.h
TDStretch.h
# WavFile.h # directly include in spu2x
cpu_detect.h)
# add library
add_library(${Output} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

View File

@ -1,383 +0,0 @@
# CMakeLists.txt
# 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
cmake_minimum_required(VERSION 2.4.4)
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:
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:
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug
Release
RelWithDebInfo
MinSizeRel.")
endif()
endif()
project(libpng C)
enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 2)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
if(NOT WIN32)
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")
endif()
else()
# not needed on windows
set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
if(DEFINED PNG_SHARED)
option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
else()
option(PNG_SHARED "Build shared lib" ON)
endif()
if(DEFINED PNG_STATIC)
option(PNG_STATIC "Build static lib" ${PNG_STATIC})
else()
option(PNG_STATIC "Build static lib" ON)
endif()
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)
# SET LIBNAME
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.)
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_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
)
set(pngstest_sources
contrib/libtests/pngstest.c
)
# SOME NEEDED DEFINITIONS
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif()
# NOW BUILD OUR TARGET
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
unset(PNG_LIB_TARGETS)
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
set(PNG_LIB_TARGETS ${PNG_LIB_NAME})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_STATIC)
# does not work without changing name
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_STATIC})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(NOT PNG_LIB_TARGETS)
message(SEND_ERROR
"No library variant selected to build. "
"Please enable at least one of the following options: PNG_STATIC, PNG_SHARED")
endif()
if(PNG_SHARED AND WIN32)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif()
if(PNG_TESTS AND PNG_SHARED)
# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
#
add_executable(pngvalid ${pngvalid_sources})
target_link_libraries(pngvalid ${PNG_LIB_NAME})
add_test(pngvalid ./pngvalid)
add_executable(pngstest ${pngstest_sources})
target_link_libraries(pngstest ${PNG_LIB_NAME})
add_test(pngstest ./pngstest
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbrn2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn0g16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbyn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n0g08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp1n3p08.png
)
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)
# 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})
if(WIN32 AND NOT CYGWIN AND NOT MSYS)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
DEPENDS ${PNG_LIB_TARGETS}
)
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
endmacro()
# libpng is a library so default to 'lib'
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})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
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)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${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 16.${PNGLIB_RELEASE}.1.6.2
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
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.
if(NOT MSVC)
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_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4)
set(PNG_EXPORT_RULE EXPORT libpng)
elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
set(PNG_EXPORT_RULE EXPORT libpng)
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(TARGETS ${PNG_LIB_TARGETS}
${PNG_EXPORT_RULE}
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(PNG_SHARED)
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(CYGWIN OR MINGW)
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} 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})
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} 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)
if(NOT WIN32 OR CYGWIN OR MINGW)
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE})
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} 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()
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 WIN32 OR CYGWIN OR MINGW)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif(NOT WIN32 OR CYGWIN OR MINGW)
endif()
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 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(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
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 )
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?
# 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

View File

@ -1,70 +0,0 @@
# zlib library
# library name
set(Output pcsx2_zlib)
set(CommonFlags
-W
)
set(OptimizationFlags
-Os
)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(${CommonFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(zlibSources
compress.c
deflate.c
gzwrite.c
trees.c
crc32.c
gzlib.c
infback.c
inftrees.c
adler32.c
gzclose.c
gzread.c
inffast.c
inflate.c
uncompr.c
zutil.c)
# variable with all headers of this library
set(zlibHeaders
gzguts.h
inffast.h
inflate.h
zconf.h
zlib.h
zutil.h
deflate.h
inffixed.h
trees.h
crc32.h
inftrees.h )
# add library
add_library(${Output} STATIC ${zlibSources} ${zlibHeaders})
# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

View File

@ -69,11 +69,6 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/locales")
add_subdirectory(locales)
endif(EXISTS "${CMAKE_SOURCE_DIR}/locales")
# make 3rdParty
if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty")
add_subdirectory(3rdparty)
endif(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty")
# make common
if(common_libs)
add_subdirectory(common/src/Utilities)