mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-02-22 11:21:04 +00:00
made windows lib build CMake based and curl build static
This commit is contained in:
parent
c0bf4084f4
commit
6dcd9ea5ec
2 changed files with 407 additions and 78 deletions
323
CMakeLists.txt
323
CMakeLists.txt
|
@ -1,65 +1,92 @@
|
|||
if(WIN32)
|
||||
include(ExternalProject)
|
||||
include(CheckIncludeFile)
|
||||
#-----------------------------------------------------------------
|
||||
# Build bundled JPEG library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_JPEG) # static
|
||||
# create a backup of jconfig.h needed for reruns of libjpeg`s makefile
|
||||
# message(STATUS "Backing up jpeg build files.")
|
||||
# file(REMOVE "${CMAKE_SOURCE_DIR}/libs/jpeg/jconfig.h"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/jpeg.sln"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/apps.sln"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/jpeg.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/jpeg.vcxproj.filters"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/cjpeg.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/cjpeg.vcxproj.filters"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/djpeg.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/djpeg.vcxproj.filters"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/jpegtran.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/jpegtran.vcxproj.filters"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/rdjpgcom.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/rdjpgcom.vcxproj.filters"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/wrjpgcom.vcxproj"
|
||||
# "${CMAKE_SOURCE_DIR}/libs/jpeg/wrjpgcom.vcxproj.filters")
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/jconfig.vc" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makejsln.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makeasln.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makejvcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makejfil.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makecvcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makecfil.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makedvcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/maketvcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makervcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/makewvcx.v10" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
check_include_file ( stddef.h HAVE_STDDEF_H )
|
||||
check_include_file ( stdlib.h HAVE_STDLIB_H )
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/libs/jpeg/libjpeg.lib
|
||||
COMMAND NMAKE /f makefile.vc setup-v10 && NMAKE /C /f makefile.vc
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/libs/jpeg
|
||||
)
|
||||
|
||||
# message(STATUS "Restoring jpeg build files.")
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/jconfig.vc" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makejsln.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makeasln.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makejvcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makejfil.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makecvcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makecfil.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makedvcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/maketvcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makervcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
# file(COPY "${CMAKE_BINARY_DIR}/makewvcx.v10" DESTINATION ${CMAKE_SOURCE_DIR}/libs/jpeg/)
|
||||
|
||||
add_custom_target(bundled_jpeg
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/libs/jpeg/libjpeg.lib
|
||||
)
|
||||
|
||||
#file(COPY "${CMAKE_SOURCE_DIR}/libs/jpeg/jconfig.vc" DESTINATION ${CMAKE_BINARY_DIR}/include)
|
||||
#file(RENAME ${CMAKE_BINARY_DIR}/include/jconfig.vc ${CMAKE_BINARY_DIR}/include/jconfig.h)
|
||||
set(JPEG_LIB "${CMAKE_SOURCE_DIR}/libs/jpeg")
|
||||
if(MSVC)
|
||||
add_definitions ( -D_CRT_SECURE_NO_WARNINGS )
|
||||
endif()
|
||||
|
||||
#set(JPEG_BUNDLED_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/jpeg-windows/jpeg.lib" PARENT_SCOPE)
|
||||
|
||||
set(JPEG_BUNDLED_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/jpeg/libjpeg.lib" PARENT_SCOPE)
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
set(TWO_FILE_COMMANDLINE true)
|
||||
endif()
|
||||
#configure_file (${JPEG_LIB}/jconfig.h.cmake ${JPEG_LIB}/jconfig.h)
|
||||
configure_file (${JPEG_LIB}/jconfig.h.cmake ${JPEG_LIB}/jconfig.h)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
FILE(GLOB JPEG_LIB_HEADERS
|
||||
${JPEG_LIB}/jerror.h
|
||||
${JPEG_LIB}/jmorecfg.h
|
||||
${JPEG_LIB}/jpeglib.h
|
||||
${JPEG_LIB}/jconfig.h
|
||||
)
|
||||
|
||||
FILE(GLOB JPEG_LIB_SRC
|
||||
${JPEG_LIB}/jmemnobs.c
|
||||
${JPEG_LIB}/jaricom.c
|
||||
${JPEG_LIB}/jcapimin.c
|
||||
${JPEG_LIB}/jcapistd.c
|
||||
${JPEG_LIB}/jcarith.c
|
||||
${JPEG_LIB}/jccoefct.c
|
||||
${JPEG_LIB}/jccolor.c
|
||||
${JPEG_LIB}/jcdctmgr.c
|
||||
${JPEG_LIB}/jchuff.c
|
||||
${JPEG_LIB}/jcinit.c
|
||||
${JPEG_LIB}/jcmainct.c
|
||||
${JPEG_LIB}/jcmarker.c
|
||||
${JPEG_LIB}/jcmaster.c
|
||||
${JPEG_LIB}/jcomapi.c
|
||||
${JPEG_LIB}/jcparam.c
|
||||
${JPEG_LIB}/jcprepct.c
|
||||
${JPEG_LIB}/jcsample.c
|
||||
${JPEG_LIB}/jctrans.c
|
||||
${JPEG_LIB}/jdapimin.c
|
||||
${JPEG_LIB}/jdapistd.c
|
||||
${JPEG_LIB}/jdarith.c
|
||||
${JPEG_LIB}/jdatadst.c
|
||||
${JPEG_LIB}/jdatasrc.c
|
||||
${JPEG_LIB}/jdcoefct.c
|
||||
${JPEG_LIB}/jdcolor.c
|
||||
${JPEG_LIB}/jddctmgr.c
|
||||
${JPEG_LIB}/jdhuff.c
|
||||
${JPEG_LIB}/jdinput.c
|
||||
${JPEG_LIB}/jdmainct.c
|
||||
${JPEG_LIB}/jdmarker.c
|
||||
${JPEG_LIB}/jdmaster.c
|
||||
${JPEG_LIB}/jdmerge.c
|
||||
${JPEG_LIB}/jdpostct.c
|
||||
${JPEG_LIB}/jdsample.c
|
||||
${JPEG_LIB}/jdtrans.c
|
||||
${JPEG_LIB}/jerror.c
|
||||
${JPEG_LIB}/jfdctflt.c
|
||||
${JPEG_LIB}/jfdctfst.c
|
||||
${JPEG_LIB}/jfdctint.c
|
||||
${JPEG_LIB}/jidctflt.c
|
||||
${JPEG_LIB}/jidctfst.c
|
||||
${JPEG_LIB}/jidctint.c
|
||||
${JPEG_LIB}/jquant1.c
|
||||
${JPEG_LIB}/jquant2.c
|
||||
${JPEG_LIB}/jutils.c
|
||||
${JPEG_LIB}/jmemmgr.c
|
||||
${JPEG_LIB}/cderror.h
|
||||
${JPEG_LIB}/cdjpeg.h
|
||||
${JPEG_LIB}/jdct.h
|
||||
${JPEG_LIB}/jinclude.h
|
||||
${JPEG_LIB}/jmemsys.h
|
||||
${JPEG_LIB}/jpegint.h
|
||||
${JPEG_LIB}/jversion.h
|
||||
${JPEG_LIB}/transupp.h
|
||||
)
|
||||
|
||||
add_library (libjpeg STATIC ${JPEG_LIB_SRC} ${JPEG_LIB_HEADERS})
|
||||
set(JPEG_BUNDLED_LIBRARIES libjpeg PARENT_SCOPE)
|
||||
set(JPEG_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/jpeg" PARENT_SCOPE)
|
||||
endif(BUNDLED_JPEG)
|
||||
|
||||
|
@ -67,18 +94,13 @@ if(WIN32)
|
|||
# Build bundled cURL library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_CURL) # DLL
|
||||
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/libs/curl/lib/release-dll/libcurl_imp.lib
|
||||
COMMAND NMAKE /C /f Makefile vc-dll VC=vc10
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/libs/curl/lib/release-dll/libcurl.dll ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/libs/curl
|
||||
ExternalProject_Add(bundled_curl
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/libs/curl
|
||||
BINARY_DIR ${PROJECT_BINARY_DIR}/libs/curl
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_CURL_EXE=0 -DBUILD_CURL_TESTS=0 -DCURL_STATICLIB=1 -DCURL_USE_ARES=0 -DCURL_ZLIB=0 -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/curl
|
||||
)
|
||||
add_custom_target(bundled_curl
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/libs/curl/lib/release-dll/libcurl_imp.lib
|
||||
)
|
||||
|
||||
#set(CURL_BUNDLED_LIBRARY "${CMAKE_SOURCE_DIR}/libs/curl-windows/libcurl.lib" PARENT_SCOPE)
|
||||
|
||||
set(CURL_BUNDLED_LIBRARY "${CMAKE_SOURCE_DIR}/libs/curl/lib/release-dll/libcurl_imp.lib" PARENT_SCOPE)
|
||||
|
||||
set(CURL_BUNDLED_LIBRARY "${PROJECT_BINARY_DIR}/curl/lib/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" wsock32 ws2_32 PARENT_SCOPE)
|
||||
set(CURL_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/curl/include" PARENT_SCOPE)
|
||||
endif(BUNDLED_CURL)
|
||||
|
||||
|
@ -86,7 +108,49 @@ if(WIN32)
|
|||
# Build bundled Lua 5.1 library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_LUA)
|
||||
set(LUA_BUNDLED_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/lua-windows/lua51.lib" PARENT_SCOPE)
|
||||
set(LUA_LIB "${CMAKE_SOURCE_DIR}/libs/lua/src")
|
||||
FILE(GLOB LUA_LIB_SRC
|
||||
${LUA_LIB}/lapi.c
|
||||
${LUA_LIB}/lcode.c
|
||||
${LUA_LIB}/ldebug.c
|
||||
${LUA_LIB}/ldo.c
|
||||
${LUA_LIB}/ldump.c
|
||||
${LUA_LIB}/lfunc.c
|
||||
${LUA_LIB}/lgc.c
|
||||
${LUA_LIB}/llex.c
|
||||
${LUA_LIB}/lmem.c
|
||||
${LUA_LIB}/lobject.c
|
||||
${LUA_LIB}/lopcodes.c
|
||||
${LUA_LIB}/lparser.c
|
||||
${LUA_LIB}/lstate.c
|
||||
${LUA_LIB}/lstring.c
|
||||
${LUA_LIB}/ltable.c
|
||||
${LUA_LIB}/ltm.c
|
||||
${LUA_LIB}/lundump.c
|
||||
${LUA_LIB}/lvm.c
|
||||
${LUA_LIB}/lzio.c
|
||||
${LUA_LIB}/lauxlib.c
|
||||
${LUA_LIB}/lbaselib.c
|
||||
${LUA_LIB}/ldblib.c
|
||||
${LUA_LIB}/liolib.c
|
||||
${LUA_LIB}/lmathlib.c
|
||||
${LUA_LIB}/loslib.c
|
||||
${LUA_LIB}/ltablib.c
|
||||
${LUA_LIB}/lstrlib.c
|
||||
${LUA_LIB}/loadlib.c
|
||||
${LUA_LIB}/linit.c
|
||||
)
|
||||
|
||||
FILE(GLOB LUA_LIB_HEADERS
|
||||
${LUA_LIB}/*.h
|
||||
)
|
||||
|
||||
add_library(liblua STATIC ${LUA_LIB_SRC} ${LUA_LIB_HEADERS})
|
||||
set_target_properties(liblua
|
||||
PROPERTIES COMPILE_DEFINITIONS "LUA_ANSI"
|
||||
)
|
||||
|
||||
set(LUA_BUNDLED_LIBRARIES liblua PARENT_SCOPE)
|
||||
set(LUA_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/lua/src" PARENT_SCOPE)
|
||||
endif(BUNDLED_LUA)
|
||||
|
||||
|
@ -109,24 +173,127 @@ if(WIN32)
|
|||
endif()
|
||||
endif(BUNDLED_SDL)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Build bundled OGG and Vorbis file library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_OGG_VORBIS)
|
||||
# OGG
|
||||
set(OGG_BUNDLED_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/ogg-windows/libogg_static.lib" PARENT_SCOPE)
|
||||
SET(OPATH "${CMAKE_SOURCE_DIR}/libs/ogg")
|
||||
|
||||
SET(OGG_SRC ${OPATH}/src/bitwise.c ${OPATH}/src/framing.c)
|
||||
SET(OGG_HEADERS ${OPATH}/include/ogg/ogg.h ${OPATH}/include/ogg/os_types.h)
|
||||
|
||||
INCLUDE_DIRECTORIES("${OPATH}/include")
|
||||
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(/D_UNICODE /DUNICODE)
|
||||
LIST(APPEND OGG_SRC ${OPATH}/win32/ogg.def)
|
||||
ENDIF(MSVC)
|
||||
|
||||
IF("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
# libogg expects configure to be called on linux to
|
||||
# generate config_types.h
|
||||
LIST(APPEND OGG_HEADERS ${OPATH}/include/ogg/config_types.h)
|
||||
add_custom_command(OUTPUT ${OPATH}/include/ogg/config_types.h
|
||||
COMMAND ${OPATH}/configure
|
||||
DEPENDS ${OPATH}/include/ogg/ogg.h # Hopefully if the libogg version changes, so does this file
|
||||
# so configure_types.h will be regenerated.
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
add_library(bundled_ogg STATIC ${OGG_SRC} ${OGG_HEADERS})
|
||||
|
||||
SET(VPATH "${CMAKE_SOURCE_DIR}/libs/vorbis")
|
||||
|
||||
SET(VORBIS_SRC
|
||||
${VPATH}/lib/analysis.c
|
||||
${VPATH}/lib/bitrate.c
|
||||
${VPATH}/lib/block.c
|
||||
${VPATH}/lib/codebook.c
|
||||
${VPATH}/lib/envelope.c
|
||||
${VPATH}/lib/floor0.c
|
||||
${VPATH}/lib/floor1.c
|
||||
${VPATH}/lib/info.c
|
||||
${VPATH}/lib/lookup.c
|
||||
${VPATH}/lib/lpc.c
|
||||
${VPATH}/lib/lsp.c
|
||||
${VPATH}/lib/mapping0.c
|
||||
${VPATH}/lib/mdct.c
|
||||
${VPATH}/lib/psy.c
|
||||
${VPATH}/lib/registry.c
|
||||
${VPATH}/lib/res0.c
|
||||
${VPATH}/lib/sharedbook.c
|
||||
${VPATH}/lib/smallft.c
|
||||
${VPATH}/lib/synthesis.c
|
||||
${VPATH}/lib/vorbisenc.c
|
||||
${VPATH}/lib/window.c
|
||||
)
|
||||
|
||||
SET(VORBIS_HEADERS
|
||||
${VPATH}/lib/backends.h
|
||||
${VPATH}/lib/bitrate.h
|
||||
${VPATH}/lib/codebook.h
|
||||
${VPATH}/lib/codec_internal.h
|
||||
${VPATH}/lib/envelope.h
|
||||
${VPATH}/lib/modes/floor_all.h
|
||||
${VPATH}/lib/books/floor/floor_books.h
|
||||
${VPATH}/lib/highlevel.h
|
||||
${VPATH}/lib/lookup.h
|
||||
${VPATH}/lib/lookup_data.h
|
||||
${VPATH}/lib/lpc.h
|
||||
${VPATH}/lib/lsp.h
|
||||
${VPATH}/lib/masking.h
|
||||
${VPATH}/lib/mdct.h
|
||||
${VPATH}/lib/misc.h
|
||||
${VPATH}/lib/os.h
|
||||
${VPATH}/lib/psy.h
|
||||
${VPATH}/lib/modes/psych_11.h
|
||||
${VPATH}/lib/modes/psych_16.h
|
||||
${VPATH}/lib/modes/psych_44.h
|
||||
${VPATH}/lib/modes/psych_8.h
|
||||
${VPATH}/lib/registry.h
|
||||
${VPATH}/lib/books/coupled/res_books_stereo.h
|
||||
${VPATH}/lib/books/uncoupled/res_books_uncoupled.h
|
||||
${VPATH}/lib/modes/residue_16.h
|
||||
${VPATH}/lib/modes/residue_44.h
|
||||
${VPATH}/lib/modes/residue_44u.h
|
||||
${VPATH}/lib/modes/residue_8.h
|
||||
${VPATH}/lib/scales.h
|
||||
${VPATH}/lib/modes/setup_11.h
|
||||
${VPATH}/lib/modes/setup_16.h
|
||||
${VPATH}/lib/modes/setup_22.h
|
||||
${VPATH}/lib/modes/setup_32.h
|
||||
${VPATH}/lib/modes/setup_44.h
|
||||
${VPATH}/lib/modes/setup_44u.h
|
||||
${VPATH}/lib/modes/setup_8.h
|
||||
${VPATH}/lib/modes/setup_X.h
|
||||
${VPATH}/lib/smallft.h
|
||||
${VPATH}/lib/window.h
|
||||
)
|
||||
|
||||
SET(VORBIS_PUB_HEADERS
|
||||
${VPATH}/include/vorbis/codec.h
|
||||
${VPATH}/include/vorbis/vorbisenc.h
|
||||
${VPATH}/include/vorbis/vorbisfile.h
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES("${VPATH}/include" "${VPATH}/lib")
|
||||
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(/D_UNICODE /DUNICODE)
|
||||
LIST(APPEND VORBIS_SRC ${VPATH}/win32/vorbis.def)
|
||||
ENDIF(MSVC)
|
||||
|
||||
add_library(bundled_ogg_vorbis STATIC ${VORBIS_SRC} ${VORBIS_HEADERS} ${VORBIS_PUB_HEADERS})
|
||||
target_link_libraries(bundled_ogg_vorbis bundled_ogg)
|
||||
add_library(bundled_ogg_vorbis_file STATIC ${VPATH}/lib/vorbisfile.c ${VPATH}/include/vorbis/vorbisfile.h)
|
||||
target_link_libraries(bundled_ogg_vorbis_file bundled_ogg bundled_ogg_vorbis)
|
||||
|
||||
set(OGG_BUNDLED_LIBRARIES bundled_ogg PARENT_SCOPE)
|
||||
set(OGG_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/ogg/include" PARENT_SCOPE)
|
||||
add_custom_target(bundled_ogg
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/libs/ogg-windows/libogg_static.lib
|
||||
)
|
||||
|
||||
set(OGG_VORBIS_BUNDLED_LIBRARIES "${CMAKE_SOURCE_DIR}/libs/ogg-windows/libvorbis_static.lib" "${CMAKE_SOURCE_DIR}/libs/ogg-windows/libvorbisfile_static.lib" PARENT_SCOPE)
|
||||
set(OGG_VORBIS_BUNDLED_LIBRARIES bundled_ogg_vorbis bundled_ogg_vorbis_file PARENT_SCOPE)
|
||||
set(OGG_VORBIS_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/vorbis/include" PARENT_SCOPE)
|
||||
add_custom_target(bundled_ogg_vorbis
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/libs/ogg-windows/libvorbis_static.lib
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/libs/ogg-windows/libvorbisfile_static.lib
|
||||
)
|
||||
endif(BUNDLED_OGG_VORBIS)
|
||||
|
||||
elseif(UNIX)
|
||||
|
|
162
jpeg/jconfig.h.cmake
Normal file
162
jpeg/jconfig.h.cmake
Normal file
|
@ -0,0 +1,162 @@
|
|||
/* based on jconfig.txt */
|
||||
|
||||
/*
|
||||
* jconfig.txt
|
||||
*
|
||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file documents the configuration options that are required to
|
||||
* customize the JPEG software for a particular system.
|
||||
*
|
||||
* The actual configuration options for a particular installation are stored
|
||||
* in jconfig.h. On many machines, jconfig.h can be generated automatically
|
||||
* or copied from one of the "canned" jconfig files that we supply. But if
|
||||
* you need to generate a jconfig.h file by hand, this file tells you how.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* These symbols indicate the properties of your machine or compiler.
|
||||
* #define the symbol if yes, #undef it if no.
|
||||
*/
|
||||
|
||||
/* Does your compiler support function prototypes?
|
||||
* (If not, you also need to use ansi2knr, see install.txt)
|
||||
*/
|
||||
#define HAVE_PROTOTYPES
|
||||
|
||||
/* Does your compiler support the declaration "unsigned char" ?
|
||||
* How about "unsigned short" ?
|
||||
*/
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
|
||||
/* Define "void" as "char" if your compiler doesn't know about type void.
|
||||
* NOTE: be sure to define void such that "void *" represents the most general
|
||||
* pointer type, e.g., that returned by malloc().
|
||||
*/
|
||||
/* #define void char */
|
||||
|
||||
/* Define "const" as empty if your compiler doesn't know the "const" keyword.
|
||||
*/
|
||||
/* #define const */
|
||||
|
||||
/* Define this if an ordinary "char" type is unsigned.
|
||||
* If you're not sure, leaving it undefined will work at some cost in speed.
|
||||
* If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
|
||||
*/
|
||||
#undef CHAR_IS_UNSIGNED
|
||||
|
||||
/* Define this if your system has an ANSI-conforming <stddef.h> file.
|
||||
*/
|
||||
#cmakedefine HAVE_STDDEF_H
|
||||
|
||||
/* Define this if your system has an ANSI-conforming <stdlib.h> file.
|
||||
*/
|
||||
#cmakedefine HAVE_STDLIB_H
|
||||
|
||||
/* Define this if your system does not have an ANSI/SysV <string.h>,
|
||||
* but does have a BSD-style <strings.h>.
|
||||
*/
|
||||
#undef NEED_BSD_STRINGS
|
||||
|
||||
/* Define this if your system does not provide typedef size_t in any of the
|
||||
* ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
|
||||
* <sys/types.h> instead.
|
||||
*/
|
||||
#undef NEED_SYS_TYPES_H
|
||||
|
||||
/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
|
||||
* unless you are using a large-data memory model or 80386 flat-memory mode.
|
||||
* On less brain-damaged CPUs this symbol must not be defined.
|
||||
* (Defining this symbol causes large data structures to be referenced through
|
||||
* "far" pointers and to be allocated with a special version of malloc.)
|
||||
*/
|
||||
#undef NEED_FAR_POINTERS
|
||||
|
||||
/* Define this if your linker needs global names to be unique in less
|
||||
* than the first 15 characters.
|
||||
*/
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
|
||||
/* Although a real ANSI C compiler can deal perfectly well with pointers to
|
||||
* unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
|
||||
* and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
|
||||
* define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
|
||||
* actually get "missing structure definition" warnings or errors while
|
||||
* compiling the JPEG code.
|
||||
*/
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
/* from jconfig.vc */
|
||||
#ifdef _MSC_VER
|
||||
/* Define "boolean" as unsigned char, not int, per Windows custom */
|
||||
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
||||
typedef unsigned char boolean;
|
||||
#endif
|
||||
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following options affect code selection within the JPEG library,
|
||||
* but they don't need to be visible to applications using the library.
|
||||
* To minimize application namespace pollution, the symbols won't be
|
||||
* defined unless JPEG_INTERNALS has been defined.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
|
||||
/* Define this if your compiler implements ">>" on signed values as a logical
|
||||
* (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
|
||||
* which is the normal and rational definition.
|
||||
*/
|
||||
#undef RIGHT_SHIFT_IS_UNSIGNED
|
||||
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
|
||||
/*
|
||||
* The remaining options do not affect the JPEG library proper,
|
||||
* but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
|
||||
* Other applications can ignore these.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_CJPEG_DJPEG
|
||||
|
||||
/* These defines indicate which image (non-JPEG) file formats are allowed. */
|
||||
|
||||
#define BMP_SUPPORTED /* BMP image file format */
|
||||
#define GIF_SUPPORTED /* GIF image file format */
|
||||
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
|
||||
#undef RLE_SUPPORTED /* Utah RLE image file format */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
|
||||
/* Define this if you want to name both input and output files on the command
|
||||
* line, rather than using stdout and optionally stdin. You MUST do this if
|
||||
* your system can't cope with binary I/O to stdin/stdout. See comments at
|
||||
* head of cjpeg.c or djpeg.c.
|
||||
*/
|
||||
#cmakedefine TWO_FILE_COMMANDLINE
|
||||
|
||||
/* Define this if your system needs explicit cleanup of temporary files.
|
||||
* This is crucial under MS-DOS, where the temporary "files" may be areas
|
||||
* of extended memory; on most other systems it's not as important.
|
||||
*/
|
||||
#undef NEED_SIGNAL_CATCHER
|
||||
|
||||
/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
|
||||
* This is necessary on systems that distinguish text files from binary files,
|
||||
* and is harmless on most systems that don't. If you have one of the rare
|
||||
* systems that complains about the "b" spec, define this symbol.
|
||||
*/
|
||||
#undef DONT_USE_B_MODE
|
||||
|
||||
/* Define this if you want percent-done progress reports from cjpeg/djpeg.
|
||||
*/
|
||||
#undef PROGRESS_REPORT
|
||||
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
Loading…
Reference in a new issue