forked from mirror/OpenTTD
Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC, Clang, and many more. It allows for a single way of doing things, so no longer we need shell scripts and vbs scripts to work on all our supported platforms. Additionally, CMake allows to generate project files for like MSVC, KDevelop, etc. This heavily reduces the lines of code we need to support multiple platforms from a project perspective. Addtiionally, this heavily improves our detection of libraries, etc.
This commit is contained in:
30
src/core/CMakeLists.txt
Normal file
30
src/core/CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
add_files(
|
||||
alloc_func.cpp
|
||||
alloc_func.hpp
|
||||
alloc_type.hpp
|
||||
backup_type.hpp
|
||||
bitmath_func.cpp
|
||||
bitmath_func.hpp
|
||||
endian_func.hpp
|
||||
endian_type.hpp
|
||||
enum_type.hpp
|
||||
geometry_func.cpp
|
||||
geometry_func.hpp
|
||||
geometry_type.hpp
|
||||
kdtree.hpp
|
||||
math_func.cpp
|
||||
math_func.hpp
|
||||
mem_func.hpp
|
||||
multimap.hpp
|
||||
overflowsafe_type.hpp
|
||||
pool_func.cpp
|
||||
pool_func.hpp
|
||||
pool_type.hpp
|
||||
random_func.cpp
|
||||
random_func.hpp
|
||||
smallmap_type.hpp
|
||||
smallmatrix_type.hpp
|
||||
smallstack_type.hpp
|
||||
smallvec_type.hpp
|
||||
string_compare_type.hpp
|
||||
)
|
@@ -23,30 +23,8 @@
|
||||
/** Big endian builds use this for TTD_ENDIAN. */
|
||||
#define TTD_BIG_ENDIAN 1
|
||||
|
||||
/* Windows has always LITTLE_ENDIAN */
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__HAIKU__)
|
||||
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
|
||||
#elif defined(OSX)
|
||||
# include <sys/types.h>
|
||||
# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
|
||||
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
|
||||
# else
|
||||
# define TTD_ENDIAN TTD_BIG_ENDIAN
|
||||
# endif
|
||||
#elif defined(__OpenBSD__)
|
||||
# include <endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
|
||||
# else
|
||||
# define TTD_ENDIAN TTD_BIG_ENDIAN
|
||||
# endif
|
||||
#elif !defined(TESTING)
|
||||
# include <sys/param.h>
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
|
||||
# else
|
||||
# define TTD_ENDIAN TTD_BIG_ENDIAN
|
||||
# endif
|
||||
#endif /* _WIN32 || __OS2__ */
|
||||
#if !defined(TTD_ENDIAN)
|
||||
# error "TTD_ENDIAN is not defined; please set it to either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN"
|
||||
#endif /* !TTD_ENDIAN */
|
||||
|
||||
#endif /* ENDIAN_TYPE_HPP */
|
||||
|
Reference in New Issue
Block a user