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:
4
src/os/CMakeLists.txt
Normal file
4
src/os/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_subdirectory(macosx)
|
||||
add_subdirectory(os2)
|
||||
add_subdirectory(unix)
|
||||
add_subdirectory(windows)
|
11
src/os/macosx/CMakeLists.txt
Normal file
11
src/os/macosx/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
add_files(
|
||||
crashlog_osx.cpp
|
||||
macos.h
|
||||
macos.mm
|
||||
osx_stdafx.h
|
||||
splash.cpp
|
||||
splash.h
|
||||
string_osx.cpp
|
||||
string_osx.h
|
||||
CONDITION APPLE
|
||||
)
|
4
src/os/os2/CMakeLists.txt
Normal file
4
src/os/os2/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_files(
|
||||
os2.cpp
|
||||
CONDITION OPTION_OS2
|
||||
)
|
9
src/os/unix/CMakeLists.txt
Normal file
9
src/os/unix/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
add_files(
|
||||
crashlog_unix.cpp
|
||||
CONDITION UNIX AND NOT APPLE AND NOT OPTION_OS2
|
||||
)
|
||||
|
||||
add_files(
|
||||
unix.cpp
|
||||
CONDITION UNIX AND NOT OPTION_OS2
|
||||
)
|
8
src/os/windows/CMakeLists.txt
Normal file
8
src/os/windows/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
add_files(
|
||||
crashlog_win.cpp
|
||||
string_uniscribe.cpp
|
||||
string_uniscribe.h
|
||||
win32.cpp
|
||||
win32.h
|
||||
CONDITION WIN32
|
||||
)
|
@@ -37,7 +37,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
100 ICON DISCARDABLE "../../../media/openttd.ico"
|
||||
100 ICON DISCARDABLE "${CMAKE_SOURCE_DIR}/os/windows/openttd.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -77,8 +77,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,11,0,!!ISODATE!!
|
||||
PRODUCTVERSION 1,11,0,!!ISODATE!!
|
||||
FILEVERSION 1,11,0,${REV_ISODATE}
|
||||
PRODUCTVERSION 1,11,0,${REV_ISODATE}
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -96,14 +96,14 @@ BEGIN
|
||||
VALUE "Comments", "This program is licensed under the GNU General Public License version 2.\0"
|
||||
VALUE "CompanyName", "OpenTTD Development Team\0"
|
||||
VALUE "FileDescription", "OpenTTD\0"
|
||||
VALUE "FileVersion", "!!VERSION!!\0"
|
||||
VALUE "FileVersion", "${REV_VERSION}\0"
|
||||
VALUE "InternalName", "openttd\0"
|
||||
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-!!YEAR!!. All Rights Reserved.\0"
|
||||
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-${REV_YEAR}. All Rights Reserved.\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "openttd.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "OpenTTD\0"
|
||||
VALUE "ProductVersion", "!!VERSION!!\0"
|
||||
VALUE "ProductVersion", "${REV_VERSION}\0"
|
||||
VALUE "SpecialBuild", "-\0"
|
||||
END
|
||||
END
|
||||
@@ -116,7 +116,7 @@ END
|
||||
#endif // !_MAC
|
||||
|
||||
#ifdef __MINGW32__
|
||||
1 24 "..\\..\\..\\projects\\dpi_aware.manifest"
|
||||
1 24 "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest"
|
||||
#endif
|
||||
|
||||
#endif // Neutral (Default) resources
|
||||
|
Reference in New Issue
Block a user