Instructions on porting Yzis
From Yzis Wiki
Random thoughts
- there is a file libyzis/portability.h you might want to check
- cmake documentation (currently:http://www.cmake.org/cmake/help/cmake2.6docs.html) has a list ofr "Variables That Describe the System" (check for this exact sentence)
cmake files
Inside cmake files (CMakeLists.txt) the following defines can be used
- MSVC : when compiling on windows using the Microsoft Virtual C++ compiler
- MINGW : when compiling on windows using mingw32 compiler
- UNIX
- APPLE
Examples:
if (MINGW)
# do something if we are using MINGW
endif (MINGW)
if (NOT UNIX)
# do something if we are NOT on Unix
endif (NOT UNIX)
Defines
Inside the code, the following defines can be used:
- YZIS_WIN32 when compiling under windows (either mingw32 or msvc)
- YZIS_WIN32_GCC when compiling under windows/mingw32
- YZIS_WIN32_MSVC when compiling under windows/msvc
- YZIS_UNIX on unix
- YZIS_APPLE on MacOsX
Examples:
#ifdef YZIS_UNIX
// do something if we are on Unix
#endif
#ifndef YZIS_APPLE
// something if we are NOT on Apple MacOS X
#endif
