50 list(APPEND OTHER_LDFLAGS ${iokit_framework}) |
50 list(APPEND OTHER_LDFLAGS ${iokit_framework}) |
51 endif(MACOSX) |
51 endif(MACOSX) |
52 |
52 |
53 # Add some gcc-specific command lines. |
53 # Add some gcc-specific command lines. |
54 if(CMAKE_COMPILER_IS_GNUCC) |
54 if(CMAKE_COMPILER_IS_GNUCC) |
55 # Always build with debug symbols...you can strip it later. |
55 # Always build with debug symbols... you can strip it later. |
56 add_definitions(-g -fsigned-char) |
56 add_definitions(-g -fsigned-char) |
57 |
|
58 # Stupid BeOS generates warnings in the system headers. |
|
59 if(NOT BEOS) |
|
60 add_definitions(-Wall) |
|
61 endif(NOT BEOS) |
|
62 |
|
63 CHECK_C_SOURCE_COMPILES(" |
|
64 #if ((defined(__GNUC__)) && (__GNUC__ >= 4)) |
|
65 int main(int argc, char **argv) { int is_gcc4 = 1; return 0; } |
|
66 #else |
|
67 #error This is not gcc4. |
|
68 #endif |
|
69 " PHYSFS_IS_GCC4) |
|
70 |
|
71 if(PHYSFS_IS_GCC4) |
|
72 # Not supported on several operating systems at this time. |
|
73 if(NOT SOLARIS AND NOT WINDOWS) |
|
74 add_definitions(-fvisibility=hidden) |
|
75 endif(NOT SOLARIS AND NOT WINDOWS) |
|
76 endif(PHYSFS_IS_GCC4) |
|
77 endif(CMAKE_COMPILER_IS_GNUCC) |
57 endif(CMAKE_COMPILER_IS_GNUCC) |
78 |
58 |
79 if(CMAKE_C_COMPILER_ID STREQUAL "SunPro") |
59 if(CMAKE_C_COMPILER_ID STREQUAL "SunPro") |
80 add_definitions(-erroff=E_EMPTY_TRANSLATION_UNIT) |
60 add_definitions(-erroff=E_EMPTY_TRANSLATION_UNIT) |
81 add_definitions(-xldscope=hidden) |
61 add_definitions(-xldscope=hidden) |
238 #if(PHYSFS_ARCHIVE_ISO9660) |
218 #if(PHYSFS_ARCHIVE_ISO9660) |
239 # add_definitions(-DPHYSFS_SUPPORTS_ISO9660=1) |
219 # add_definitions(-DPHYSFS_SUPPORTS_ISO9660=1) |
240 # set(PHYSFS_FEATURES "${PHYSFS_FEATURES} CD-ROM") |
220 # set(PHYSFS_FEATURES "${PHYSFS_FEATURES} CD-ROM") |
241 #endif(PHYSFS_ARCHIVE_ISO9660) |
221 #endif(PHYSFS_ARCHIVE_ISO9660) |
242 |
222 |
|
223 |
243 ##Hedgewars modifications |
224 ##Hedgewars modifications |
244 add_library(physfs ${PHYSFS_SRCS}) |
225 add_library(physfs ${PHYSFS_SRCS}) |
245 set_target_properties(physfs PROPERTIES |
226 set_target_properties(physfs PROPERTIES |
246 VERSION ${PHYSFS_VERSION} |
227 VERSION ${PHYSFS_VERSION} |
247 SOVERSION ${PHYSFS_SOVERSION} |
228 SOVERSION ${PHYSFS_SOVERSION} |