INCLUDE(CheckCXXCompilerFlag)
-## Detect architecture
-IF(WIN32)
- SET(MACHINE WINDOWS)
-ELSE()
- SET(MACHINE PCLINUX)
-ENDIF()
-
## Test for 64 bits
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(MACHINE_IS_64 TRUE)
ELSE()
SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P}) # Set sizeof(long) the same as size of pointers
ENDIF()
+ SET(MACHINE WINDOWS)
+ ADD_DEFINITIONS(-DWINDOWS)
ADD_DEFINITIONS(-DUNICODE) # Unicode
ADD_DEFINITIONS(-D_UNICODE)
ELSE()
## Linux specific:
SET(PLATFORM_LIBS dl) # Dynamic loading (dlopen, dlsym)
IF(MACHINE_IS_64)
+ SET(MACHINE PCLINUX64)
ADD_DEFINITIONS(-DPCLINUX64)
+ ELSE(MACHINE_IS_64)
+ SET(MACHINE PCLINUX)
+ ADD_DEFINITIONS(-DPCLINUX)
ENDIF(MACHINE_IS_64)
ENDIF()