CMakeLists.txt
author Ryan C. Gordon <icculus@icculus.org>
Mon, 20 Apr 2009 23:41:27 -0400
changeset 992 65f29e70a322
parent 991 9748fd040468
child 993 e8ba2577ac1f
permissions -rw-r--r--
Fixed SET_SOURCE_FILES_PROPERTIES in CMakefile for wxWidgets test app.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
# PhysicsFS; a portable, flexible file i/o abstraction.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
# Copyright (C) 2007  Ryan C. Gordon.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
#
809
116b8fe30371 Renamed LICENSE to LICENSE.txt
Ryan C. Gordon <icculus@icculus.org>
parents: 805
diff changeset
     4
# Please see the file LICENSE.txt in the source's root directory.
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
804
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
     6
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
     7
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
PROJECT(PhysicsFS)
956
3da716cfe09f Upped version to 2.0.0!
Ryan C. Gordon <icculus@icculus.org>
parents: 952
diff changeset
     9
SET(PHYSFS_VERSION 2.0.0)
950
7bb0b0d26479 Corrected soname.
Ryan C. Gordon <icculus@icculus.org>
parents: 919
diff changeset
    10
7bb0b0d26479 Corrected soname.
Ryan C. Gordon <icculus@icculus.org>
parents: 919
diff changeset
    11
# Increment this if/when we break backwards compatibility.
952
bbe76b085d4d Screw it, change this back.
Ryan C. Gordon <icculus@icculus.org>
parents: 950
diff changeset
    12
SET(PHYSFS_SOVERSION 1)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
# I hate that they define "WIN32" ... we're about to move to Win64...I hope!
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
IF(WIN32 AND NOT WINDOWS)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
    SET(WINDOWS TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
ENDIF(WIN32 AND NOT WINDOWS)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
# Bleh, let's do it for "APPLE" too.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
IF(APPLE AND NOT MACOSX)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
    SET(MACOSX TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
ENDIF(APPLE AND NOT MACOSX)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
981
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    24
# And this might be wrong...
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    25
IF (CMAKE_SYSTEM MATCHES OS2)
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    26
    SET(OS2 TRUE)
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    27
ENDIF (CMAKE_SYSTEM MATCHES OS2)
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    28
985
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    29
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    30
    SET(SOLARIS TRUE)
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    31
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    32
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
INCLUDE(CheckIncludeFile)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
INCLUDE(CheckLibraryExists)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
INCLUDE(CheckCSourceCompiles)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
980
4608f823787f Fixed include directory in CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    37
INCLUDE_DIRECTORIES(./src)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
IF(MACOSX)
803
4b1e0994ab97 Clarified a comment.
Ryan C. Gordon <icculus@icculus.org>
parents: 802
diff changeset
    40
    # Fallback to older OS X on PowerPC to support wider range of systems...
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
    IF(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
801
a6d25b52f2c7 Fixes to CMakeLists.txt for Intel Mac.
Ryan C. Gordon <icculus@icculus.org>
parents: 799
diff changeset
    42
        ADD_DEFINITIONS(-DMAC_OS_X_VERSION_MIN_REQUIRED=1020)
a6d25b52f2c7 Fixes to CMakeLists.txt for Intel Mac.
Ryan C. Gordon <icculus@icculus.org>
parents: 799
diff changeset
    43
        SET(OTHER_LDFLAGS ${OTHER_LDFLAGS} " -mmacosx-version-min=10.2")
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
    ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
803
4b1e0994ab97 Clarified a comment.
Ryan C. Gordon <icculus@icculus.org>
parents: 802
diff changeset
    45
4b1e0994ab97 Clarified a comment.
Ryan C. Gordon <icculus@icculus.org>
parents: 802
diff changeset
    46
    # Need these everywhere...
4b1e0994ab97 Clarified a comment.
Ryan C. Gordon <icculus@icculus.org>
parents: 802
diff changeset
    47
    ADD_DEFINITIONS(-fno-common)
801
a6d25b52f2c7 Fixes to CMakeLists.txt for Intel Mac.
Ryan C. Gordon <icculus@icculus.org>
parents: 799
diff changeset
    48
    SET(OTHER_LDFLAGS ${OTHER_LDFLAGS} " -framework Carbon -framework IOKit")
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
ENDIF(MACOSX)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
# Add some gcc-specific command lines.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
IF(CMAKE_COMPILER_IS_GNUCC)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
    # Always build with debug symbols...you can strip it later.
821
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    54
    ADD_DEFINITIONS(-g -pipe -Werror -fsigned-char)
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    55
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    56
    # Stupid BeOS generates warnings in the system headers.
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    57
    IF(NOT BEOS)
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    58
        ADD_DEFINITIONS(-Wall)
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
    59
    ENDIF(NOT BEOS)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
    CHECK_C_SOURCE_COMPILES("
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
        #if ((defined(__GNUC__)) && (__GNUC__ >= 4))
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
        int main(int argc, char **argv) { int is_gcc4 = 1; return 0; }
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
        #else
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
        #error This is not gcc4.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
        #endif
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
    " PHYSFS_IS_GCC4)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
    IF(PHYSFS_IS_GCC4)
985
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    70
        IF((NOT OS2) AND (NOT SOLARIS)) # Not supported on OS/2 or Solaris.
981
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
    71
            ADD_DEFINITIONS(-fvisibility=hidden)
985
dc38a51538aa More Solaris fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 981
diff changeset
    72
        ENDIF((NOT OS2) AND (NOT SOLARIS))
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
    ENDIF(PHYSFS_IS_GCC4)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
ENDIF(CMAKE_COMPILER_IS_GNUCC)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
989
70132355a297 Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
Ryan C. Gordon <icculus@icculus.org>
parents: 985
diff changeset
    76
IF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
70132355a297 Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
Ryan C. Gordon <icculus@icculus.org>
parents: 985
diff changeset
    77
    ADD_DEFINITIONS(-erroff=E_EMPTY_TRANSLATION_UNIT)
991
9748fd040468 Added the Sun Studio equivalent of -fvisibility=hidden
Ryan C. Gordon <icculus@icculus.org>
parents: 990
diff changeset
    78
    ADD_DEFINITIONS(-xldscope=hidden)
989
70132355a297 Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
Ryan C. Gordon <icculus@icculus.org>
parents: 985
diff changeset
    79
ENDIF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
70132355a297 Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
Ryan C. Gordon <icculus@icculus.org>
parents: 985
diff changeset
    80
836
6514fba91816 Patched to compile with latest Platform SDK.
Ryan C. Gordon <icculus@icculus.org>
parents: 833
diff changeset
    81
IF(MSVC)
6514fba91816 Patched to compile with latest Platform SDK.
Ryan C. Gordon <icculus@icculus.org>
parents: 833
diff changeset
    82
    # VS.NET 8.0 got really really anal about strcpy, etc, which even if we
6514fba91816 Patched to compile with latest Platform SDK.
Ryan C. Gordon <icculus@icculus.org>
parents: 833
diff changeset
    83
    #  cleaned up our code, zlib, etc still use...so disable the warning.
6514fba91816 Patched to compile with latest Platform SDK.
Ryan C. Gordon <icculus@icculus.org>
parents: 833
diff changeset
    84
    ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1)
6514fba91816 Patched to compile with latest Platform SDK.
Ryan C. Gordon <icculus@icculus.org>
parents: 833
diff changeset
    85
ENDIF(MSVC)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
# Basic chunks of source code ...
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
SET(ZLIB_SRCS
972
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    90
    src/zlib123/adler32.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    91
    src/zlib123/compress.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    92
    src/zlib123/crc32.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    93
    src/zlib123/deflate.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    94
    src/zlib123/gzio.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    95
    src/zlib123/infback.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    96
    src/zlib123/inffast.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    97
    src/zlib123/inflate.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    98
    src/zlib123/inftrees.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
    99
    src/zlib123/trees.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   100
    src/zlib123/uncompr.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   101
    src/zlib123/zutil.c
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
SET(LZMA_SRCS
972
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   105
    src/lzma/C/7zCrc.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   106
    src/lzma/C/Archive/7z/7zBuffer.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   107
    src/lzma/C/Archive/7z/7zDecode.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   108
    src/lzma/C/Archive/7z/7zExtract.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   109
    src/lzma/C/Archive/7z/7zHeader.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   110
    src/lzma/C/Archive/7z/7zIn.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   111
    src/lzma/C/Archive/7z/7zItem.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   112
    src/lzma/C/Archive/7z/7zMethodID.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   113
    src/lzma/C/Compress/Branch/BranchX86.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   114
    src/lzma/C/Compress/Branch/BranchX86_2.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   115
    src/lzma/C/Compress/Lzma/LzmaDecode.c
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   118
IF(BEOS)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   119
    # We add this explicitly, since we don't want CMake to think this
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   120
    #  is a C++ project unless we're on BeOS.
972
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   121
    SET(PHYSFS_BEOS_SRCS src/platform_beos.cpp)
821
c7dd97edaa4e Fixes for BeOS and gcc2.
Ryan C. Gordon <icculus@icculus.org>
parents: 818
diff changeset
   122
    SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} be root)
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   123
ENDIF(BEOS)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   124
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   125
# Almost everything is "compiled" here, but things that don't apply to the
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   126
#  build are #ifdef'd out. This is to make it easy to embed PhysicsFS into
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   127
#  another project or bring up a new build system: just compile all the source
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   128
#  code and #define the things you want.
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
SET(PHYSFS_SRCS
972
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   130
    src/physfs.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   131
    src/physfs_byteorder.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   132
    src/physfs_unicode.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   133
    src/platform_os2.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   134
    src/platform_pocketpc.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   135
    src/platform_posix.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   136
    src/platform_unix.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   137
    src/platform_macosx.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   138
    src/platform_windows.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   139
    src/archiver_dir.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   140
    src/archiver_grp.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   141
    src/archiver_hog.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   142
    src/archiver_lzma.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   143
    src/archiver_mvl.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   144
    src/archiver_qpak.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   145
    src/archiver_wad.c
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 956
diff changeset
   146
    src/archiver_zip.c
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   147
    ${PHYSFS_BEOS_SRCS}
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   148
)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   149
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   150
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   151
# platform layers ...
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   153
IF(UNIX)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   154
    IF(BEOS)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   155
        SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   156
        SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   157
        SET(HAVE_PTHREAD_H TRUE)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   158
    ELSE(BEOS)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   159
        # !!! FIXME
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   160
        #  AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   161
        CHECK_INCLUDE_FILE(sys/ucred.h HAVE_UCRED_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   162
        IF(HAVE_UCRED_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   163
            ADD_DEFINITIONS(-DPHYSFS_HAVE_SYS_UCRED_H=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   164
            SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   165
        ENDIF(HAVE_UCRED_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   166
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   167
        CHECK_INCLUDE_FILE(mntent.h HAVE_MNTENT_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   168
        IF(HAVE_MNTENT_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   169
            ADD_DEFINITIONS(-DPHYSFS_HAVE_MNTENT_H=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   170
            SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   171
        ENDIF(HAVE_MNTENT_H)
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   172
990
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   173
        # !!! FIXME: Solaris fails this, because mnttab.h implicitly
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   174
        # !!! FIXME:  depends on other system headers.  :(
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   175
        #CHECK_INCLUDE_FILE(sys/mnttab.h HAVE_SYS_MNTTAB_H)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   176
        CHECK_C_SOURCE_COMPILES("
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   177
            #include <stdio.h>
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   178
            #include <sys/mnttab.h>
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   179
            int main(int argc, char **argv) { return 0; }
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   180
        " HAVE_SYS_MNTTAB_H)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   181
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   182
        IF(HAVE_SYS_MNTTAB_H)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   183
            ADD_DEFINITIONS(-DPHYSFS_HAVE_SYS_MNTTAB_H=1)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   184
            SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   185
        ENDIF(HAVE_SYS_MNTTAB_H)
c25717b5c165 Added sys/mnttab.h CD-ROM detection. Fixes missing CD-ROM support on Solaris.
Ryan C. Gordon <icculus@icculus.org>
parents: 989
diff changeset
   186
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   187
        CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   188
        IF(HAVE_PTHREAD_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   189
            SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   190
        ELSE(HAVE_PTHREAD_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   191
            ADD_DEFINITIONS(-DPHYSFS_NO_PTHREADS_SUPPORT=1)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   192
        ENDIF(HAVE_PTHREAD_H)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   193
    ENDIF(BEOS)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   194
ENDIF(UNIX)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   195
981
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
   196
IF(WINDOWS OR OS2)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   197
    SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   198
    SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
981
dcbe34cebfeb OS/2 build fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 980
diff changeset
   199
ENDIF(WINDOWS OR OS2)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   200
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   201
IF(NOT PHYSFS_HAVE_CDROM_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   202
    ADD_DEFINITIONS(-DPHYSFS_NO_CDROM_SUPPORT=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   203
    MESSAGE(WARNING " ***")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   204
    MESSAGE(WARNING " *** There is no CD-ROM support in this build!")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   205
    MESSAGE(WARNING " *** PhysicsFS will just pretend there are no discs.")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   206
    MESSAGE(WARNING " *** This may be fine, depending on how PhysicsFS is used,")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   207
    MESSAGE(WARNING " ***   but is this what you REALLY wanted?")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   208
    MESSAGE(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   209
    MESSAGE(WARNING " ***")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   210
ENDIF(NOT PHYSFS_HAVE_CDROM_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   211
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   212
IF(PHYSFS_HAVE_THREAD_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   213
    ADD_DEFINITIONS(-D_REENTRANT -D_THREAD_SAFE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   214
ELSE(PHYSFS_HAVE_THREAD_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   215
    MESSAGE(WARNING " ***")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   216
    MESSAGE(WARNING " *** There is no thread support in this build!")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   217
    MESSAGE(WARNING " *** PhysicsFS will NOT be reentrant!")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   218
    MESSAGE(WARNING " *** This may be fine, depending on how PhysicsFS is used,")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   219
    MESSAGE(WARNING " ***   but is this what you REALLY wanted?")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   220
    MESSAGE(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   221
    MESSAGE(WARNING " ***")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   222
ENDIF(PHYSFS_HAVE_THREAD_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   223
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   224
CHECK_INCLUDE_FILE(assert.h HAVE_ASSERT_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   225
IF(HAVE_ASSERT_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   226
    ADD_DEFINITIONS(-DHAVE_ASSERT_H=1)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   227
ENDIF(HAVE_ASSERT_H)
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   228
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   229
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   230
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   231
# Archivers ...
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   232
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   233
OPTION(PHYSFS_ARCHIVE_ZIP "Enable ZIP support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   234
IF(PHYSFS_ARCHIVE_ZIP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   235
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ZIP=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   236
    SET(PHYSFS_NEED_ZLIB TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   237
ENDIF(PHYSFS_ARCHIVE_ZIP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   238
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   239
OPTION(PHYSFS_ARCHIVE_7Z "Enable 7zip support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   240
IF(PHYSFS_ARCHIVE_7Z)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   241
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_7Z=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   242
    # !!! FIXME: rename to 7z.c?
818
e36f23f49042 Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
   243
    SET(PHYSFS_SRCS ${PHYSFS_SRCS} ${LZMA_SRCS})
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   244
ENDIF(PHYSFS_ARCHIVE_7Z)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   245
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   246
OPTION(PHYSFS_ARCHIVE_GRP "Enable Build Engine GRP support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   247
IF(PHYSFS_ARCHIVE_GRP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   248
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_GRP=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   249
ENDIF(PHYSFS_ARCHIVE_GRP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   250
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   251
OPTION(PHYSFS_ARCHIVE_WAD "Enable Doom WAD support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   252
IF(PHYSFS_ARCHIVE_WAD)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   253
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_WAD=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   254
ENDIF(PHYSFS_ARCHIVE_WAD)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   255
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   256
OPTION(PHYSFS_ARCHIVE_HOG "Enable Descent I/II HOG support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   257
IF(PHYSFS_ARCHIVE_HOG)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   258
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_HOG=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   259
ENDIF(PHYSFS_ARCHIVE_HOG)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   260
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   261
OPTION(PHYSFS_ARCHIVE_MVL "Enable Descent I/II MVL support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   262
IF(PHYSFS_ARCHIVE_MVL)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   263
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_MVL=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   264
ENDIF(PHYSFS_ARCHIVE_MVL)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   265
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   266
OPTION(PHYSFS_ARCHIVE_QPAK "Enable Quake I/II QPAK support" TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   267
IF(PHYSFS_ARCHIVE_QPAK)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   268
    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_QPAK=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   269
ENDIF(PHYSFS_ARCHIVE_QPAK)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   270
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   271
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   272
# See if some archiver required zlib, and see about using system version.
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   273
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   274
IF(PHYSFS_NEED_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   275
    CHECK_INCLUDE_FILE(zlib.h HAVE_ZLIB_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   276
    IF(HAVE_ZLIB_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   277
        CHECK_LIBRARY_EXISTS("z" "inflate" "" HAVE_LIBZ)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   278
        IF(HAVE_LIBZ)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   279
            SET(HAVE_SYSTEM_ZLIB TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   280
        ENDIF(HAVE_LIBZ)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   281
    ENDIF(HAVE_ZLIB_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   282
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   283
    IF(HAVE_SYSTEM_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   284
        OPTION(PHYSFS_INTERNAL_ZLIB "Link own zlib instead of system library" FALSE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   285
    ELSE(HAVE_SYSTEM_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   286
        SET(PHYSFS_INTERNAL_ZLIB TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   287
    ENDIF(HAVE_SYSTEM_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   288
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   289
    IF(PHYSFS_INTERNAL_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   290
        INCLUDE_DIRECTORIES(zlib123)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   291
        ADD_DEFINITIONS(-DZ_PREFIX=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   292
        SET(PHYSFS_SRCS ${PHYSFS_SRCS} ${ZLIB_SRCS})
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   293
    ELSE(PHYSFS_INTERNAL_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   294
        SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} z)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   295
    ENDIF(PHYSFS_INTERNAL_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   296
ENDIF(PHYSFS_NEED_ZLIB)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   297
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   298
OPTION(PHYSFS_BUILD_STATIC "Build static library" TRUE)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   299
IF(PHYSFS_BUILD_STATIC)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   300
    ADD_LIBRARY(physfs-static STATIC ${PHYSFS_SRCS})
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   301
    SET_TARGET_PROPERTIES(physfs-static PROPERTIES OUTPUT_NAME "physfs")
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   302
    SET(PHYSFS_LIB_TARGET physfs-static)
833
b260f190aa59 Whoops, switched two strings in CMakeLists.txt
Ryan C. Gordon <icculus@icculus.org>
parents: 827
diff changeset
   303
    SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs-static")
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   304
ENDIF(PHYSFS_BUILD_STATIC)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   305
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   306
OPTION(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   307
IF(PHYSFS_BUILD_SHARED)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   308
    ADD_LIBRARY(physfs SHARED ${PHYSFS_SRCS})
805
b462f06edbca Install libraries with a VERSION and SOVERSION.
Ryan C. Gordon <icculus@icculus.org>
parents: 804
diff changeset
   309
    SET_TARGET_PROPERTIES(physfs PROPERTIES VERSION ${PHYSFS_VERSION})
b462f06edbca Install libraries with a VERSION and SOVERSION.
Ryan C. Gordon <icculus@icculus.org>
parents: 804
diff changeset
   310
    SET_TARGET_PROPERTIES(physfs PROPERTIES SOVERSION ${PHYSFS_SOVERSION})
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   311
    TARGET_LINK_LIBRARIES(physfs ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   312
    SET(PHYSFS_LIB_TARGET physfs)
833
b260f190aa59 Whoops, switched two strings in CMakeLists.txt
Ryan C. Gordon <icculus@icculus.org>
parents: 827
diff changeset
   313
    SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs")
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   314
ENDIF(PHYSFS_BUILD_SHARED)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   315
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   316
IF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   317
    MESSAGE(FATAL "Both shared and static libraries are disabled!")
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   318
ENDIF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   319
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   320
# CMake FAQ says I need this...
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   321
IF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   322
    SET_TARGET_PROPERTIES(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   323
    SET_TARGET_PROPERTIES(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   324
ENDIF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   325
878
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   326
OPTION(PHYSFS_BUILD_TEST "Build stdio test program." TRUE)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   327
MARK_AS_ADVANCED(PHYSFS_BUILD_TEST)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   328
IF(PHYSFS_BUILD_TEST)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   329
    CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   330
    CHECK_INCLUDE_FILE(readline/history.h HAVE_HISTORY_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   331
    IF(HAVE_READLINE_H AND HAVE_HISTORY_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   332
        SET(CMAKE_REQUIRED_LIBRARIES curses)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   333
        CHECK_LIBRARY_EXISTS("readline" "readline" "" HAVE_LIBREADLINE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   334
        CHECK_LIBRARY_EXISTS("readline" "history" "" HAVE_LIBHISTORY)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   335
        IF(HAVE_LIBREADLINE AND HAVE_LIBHISTORY)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   336
            SET(HAVE_SYSTEM_READLINE TRUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   337
            SET(TEST_PHYSFS_LIBS ${TEST_PHYSFS_LIBS} " " readline curses)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   338
            ADD_DEFINITIONS(-DPHYSFS_HAVE_READLINE=1)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   339
        ENDIF(HAVE_LIBREADLINE AND HAVE_LIBHISTORY)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   340
    ENDIF(HAVE_READLINE_H AND HAVE_HISTORY_H)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   341
    ADD_EXECUTABLE(test_physfs test/test_physfs.c)
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   342
    TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS})
804
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   343
    SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs")
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   344
ENDIF(PHYSFS_BUILD_TEST)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   345
878
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   346
OPTION(PHYSFS_BUILD_WX_TEST "Build wxWidgets test program." TRUE)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   347
MARK_AS_ADVANCED(PHYSFS_BUILD_WX_TEST)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   348
IF(PHYSFS_BUILD_WX_TEST)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   349
    SET(wxWidgets_USE_LIBS base core adv)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   350
    SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   351
    FIND_PACKAGE(wxWidgets)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   352
    IF(wxWidgets_FOUND)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   353
        INCLUDE(${wxWidgets_USE_FILE})
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   354
        ADD_EXECUTABLE(wxtest_physfs test/wxtest_physfs.cpp)
992
65f29e70a322 Fixed SET_SOURCE_FILES_PROPERTIES in CMakefile for wxWidgets test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 991
diff changeset
   355
        SET_SOURCE_FILES_PROPERTIES(test/wxtest_physfs.cpp PROPERTIES COMPILE_FLAGS "${wxWidgets_CXX_FLAGS}")
878
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   356
        TARGET_LINK_LIBRARIES(wxtest_physfs ${PHYSFS_LIB_TARGET} ${wxWidgets_LIBRARIES} ${OTHER_LDFLAGS})
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   357
        SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";wxtest_physfs")
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   358
    ELSE(wxWidgets_FOUND)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   359
        MESSAGE(STATUS "wxWidgets not found. Disabling wx test app.")
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   360
        SET(PHYSFS_BUILD_WX_TEST FALSE)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   361
    ENDIF(wxWidgets_FOUND)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   362
ENDIF(PHYSFS_BUILD_WX_TEST)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   363
804
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   364
INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS}
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   365
        RUNTIME DESTINATION bin
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   366
        LIBRARY DESTINATION lib
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   367
        ARCHIVE DESTINATION lib)
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   368
INSTALL(FILES physfs.h DESTINATION include)
45c29325e017 Added install targets for "make install"
Ryan C. Gordon <icculus@icculus.org>
parents: 803
diff changeset
   369
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   370
FIND_PACKAGE(Doxygen)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   371
IF(DOXYGEN_FOUND)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   372
    ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} COMMENT "Building documentation")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   373
ELSE(DOXYGEN_FOUND)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   374
    MESSAGE(STATUS "Doxygen not found. You won't be able to build documentation.")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   375
ENDIF(DOXYGEN_FOUND)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   376
885
e1fe7fe85939 Added a hack for "make dist" functionality.
Ryan C. Gordon <icculus@icculus.org>
parents: 878
diff changeset
   377
IF(UNIX)
e1fe7fe85939 Added a hack for "make dist" functionality.
Ryan C. Gordon <icculus@icculus.org>
parents: 878
diff changeset
   378
    ADD_CUSTOM_TARGET(dist ./extras/makedist.sh ${PHYSFS_VERSION} COMMENT "Building source tarball")
e1fe7fe85939 Added a hack for "make dist" functionality.
Ryan C. Gordon <icculus@icculus.org>
parents: 878
diff changeset
   379
ENDIF(UNIX)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   380
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   381
MACRO(MESSAGE_BOOL_OPTION _NAME _VALUE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   382
    IF(${_VALUE})
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   383
        MESSAGE(STATUS "  ${_NAME}: enabled")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   384
    ELSE(${_VALUE})
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   385
        MESSAGE(STATUS "  ${_NAME}: disabled")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   386
    ENDIF(${_VALUE})
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   387
ENDMACRO(MESSAGE_BOOL_OPTION)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   388
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   389
MESSAGE(STATUS "PhysicsFS will build with the following options:")
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   390
MESSAGE_BOOL_OPTION("ZIP support" PHYSFS_ARCHIVE_ZIP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   391
MESSAGE_BOOL_OPTION("7zip support" PHYSFS_ARCHIVE_7Z)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   392
MESSAGE_BOOL_OPTION("GRP support" PHYSFS_ARCHIVE_GRP)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   393
MESSAGE_BOOL_OPTION("WAD support" PHYSFS_ARCHIVE_WAD)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   394
MESSAGE_BOOL_OPTION("HOG support" PHYSFS_ARCHIVE_HOG)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   395
MESSAGE_BOOL_OPTION("MVL support" PHYSFS_ARCHIVE_MVL)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   396
MESSAGE_BOOL_OPTION("QPAK support" PHYSFS_ARCHIVE_QPAK)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   397
MESSAGE_BOOL_OPTION("CD-ROM drive support" PHYSFS_HAVE_CDROM_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   398
MESSAGE_BOOL_OPTION("Thread safety" PHYSFS_HAVE_THREAD_SUPPORT)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   399
MESSAGE_BOOL_OPTION("Build own zlib" PHYSFS_INTERNAL_ZLIB)
802
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   400
MESSAGE_BOOL_OPTION("Build static library" PHYSFS_BUILD_STATIC)
d04103af68a5 Can now build shared or static (or both) libraries.
Ryan C. Gordon <icculus@icculus.org>
parents: 801
diff changeset
   401
MESSAGE_BOOL_OPTION("Build shared library" PHYSFS_BUILD_SHARED)
878
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   402
MESSAGE_BOOL_OPTION("Build wxWidgets test program" PHYSFS_BUILD_WX_TEST)
6d65c5e0049a Added initial work on a wxWidgets-based test app.
Ryan C. Gordon <icculus@icculus.org>
parents: 847
diff changeset
   403
MESSAGE_BOOL_OPTION("Build stdio test program" PHYSFS_BUILD_TEST)
798
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   404
IF(PHYSFS_BUILD_TEST)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   405
    MESSAGE_BOOL_OPTION("  Use readline in test program" HAVE_SYSTEM_READLINE)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   406
ENDIF(PHYSFS_BUILD_TEST)
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   407
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   408
# end of CMakeLists.txt ...
18455baab480 Moved to CMake!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   409