CMakeLists.txt
changeset 981 dcbe34cebfeb
parent 980 4608f823787f
child 985 dc38a51538aa
equal deleted inserted replaced
980:4608f823787f 981:dcbe34cebfeb
    18 
    18 
    19 # Bleh, let's do it for "APPLE" too.
    19 # Bleh, let's do it for "APPLE" too.
    20 IF(APPLE AND NOT MACOSX)
    20 IF(APPLE AND NOT MACOSX)
    21     SET(MACOSX TRUE)
    21     SET(MACOSX TRUE)
    22 ENDIF(APPLE AND NOT MACOSX)
    22 ENDIF(APPLE AND NOT MACOSX)
       
    23 
       
    24 # And this might be wrong...
       
    25 IF (CMAKE_SYSTEM MATCHES OS2)
       
    26     SET(OS2 TRUE)
       
    27 ENDIF (CMAKE_SYSTEM MATCHES OS2)
    23 
    28 
    24 INCLUDE(CheckIncludeFile)
    29 INCLUDE(CheckIncludeFile)
    25 INCLUDE(CheckLibraryExists)
    30 INCLUDE(CheckLibraryExists)
    26 INCLUDE(CheckCSourceCompiles)
    31 INCLUDE(CheckCSourceCompiles)
    27 
    32 
    56         #error This is not gcc4.
    61         #error This is not gcc4.
    57         #endif
    62         #endif
    58     " PHYSFS_IS_GCC4)
    63     " PHYSFS_IS_GCC4)
    59 
    64 
    60     IF(PHYSFS_IS_GCC4)
    65     IF(PHYSFS_IS_GCC4)
    61         ADD_DEFINITIONS(-fvisibility=hidden)
    66         IF (NOT OS2)  # Not supported on OS/2.
       
    67             ADD_DEFINITIONS(-fvisibility=hidden)
       
    68         ENDIF (NOT OS2)
    62     ENDIF(PHYSFS_IS_GCC4)
    69     ENDIF(PHYSFS_IS_GCC4)
    63 ENDIF(CMAKE_COMPILER_IS_GNUCC)
    70 ENDIF(CMAKE_COMPILER_IS_GNUCC)
    64 
    71 
    65 IF(MSVC)
    72 IF(MSVC)
    66     # VS.NET 8.0 got really really anal about strcpy, etc, which even if we
    73     # VS.NET 8.0 got really really anal about strcpy, etc, which even if we
   161             ADD_DEFINITIONS(-DPHYSFS_NO_PTHREADS_SUPPORT=1)
   168             ADD_DEFINITIONS(-DPHYSFS_NO_PTHREADS_SUPPORT=1)
   162         ENDIF(HAVE_PTHREAD_H)
   169         ENDIF(HAVE_PTHREAD_H)
   163     ENDIF(BEOS)
   170     ENDIF(BEOS)
   164 ENDIF(UNIX)
   171 ENDIF(UNIX)
   165 
   172 
   166 IF(WINDOWS)
   173 IF(WINDOWS OR OS2)
   167     SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
   174     SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE)
   168     SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
   175     SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
   169 ENDIF(WINDOWS)
   176 ENDIF(WINDOWS OR OS2)
   170 
   177 
   171 IF(NOT PHYSFS_HAVE_CDROM_SUPPORT)
   178 IF(NOT PHYSFS_HAVE_CDROM_SUPPORT)
   172     ADD_DEFINITIONS(-DPHYSFS_NO_CDROM_SUPPORT=1)
   179     ADD_DEFINITIONS(-DPHYSFS_NO_CDROM_SUPPORT=1)
   173     MESSAGE(WARNING " ***")
   180     MESSAGE(WARNING " ***")
   174     MESSAGE(WARNING " *** There is no CD-ROM support in this build!")
   181     MESSAGE(WARNING " *** There is no CD-ROM support in this build!")