Commit Graph

213 Commits (7fe75e20ad8d778d70e3046d9e76e13337722040)

Author SHA1 Message Date
MrSimbax df65862c49 Start using CMake targets instead of variables
Moved most of the variables to targets in the main src.

Made libraries in repo export targets.

Refactor STATIC flags a little and add more.

This commit definitely breaks a lot of things like tests
but the main game builds at least with MSVC.
2020-07-10 18:49:54 +02:00
MrSimbax b9297cd9f4 Bump CMake version 2020-07-09 21:25:47 +02:00
MrSimbax 0597c0efda Try to fix Jenkins build 2020-04-05 14:11:08 +02:00
MrSimbax 621453a01c Make all relative paths use base dir 2020-04-05 13:24:45 +02:00
MrSimbax 8f122d6603 Fix MSVC compilation (again) 2020-04-03 20:18:14 +02:00
MrSimbax 5cefa57dd5 Use base dir instead of working dir for data files 2019-08-07 09:51:27 +02:00
tomangelo 97a8cfe6f9
Merge pull request #1251 from fernape/fix-freebsd-build
Add FreeBSD support.
2019-04-10 22:13:15 +02:00
fernape 44083053ce Add FreeBSD support.
Add a new PLATFORM_FREEBSD variable. We can compile like MacOS with just an
extra linker flag.
2019-03-09 19:04:00 +01:00
MrSimbax d4ab82eaae Release 0.1.12-alpha: Bump version 2019-02-23 20:01:33 +01:00
MrSimbax ef6b692d41 Post-release 0.1.12-alpha 2019-02-23 20:01:33 +01:00
MrSimbax f93fd61c26 Rename OFFICIAL_BUILD to OFFICIAL_COLOBOT_BUILD
In order to avoid conflict with OFFICIAL_BUILD variable inside ntverp.h. It caused compilation error "invalid integer expression"

https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/shared/ntverp.h#L134
2018-07-25 21:34:39 +02:00
Mateusz Przybył abb7d54ef5 Add support for VS CMake/vcpkg compilation (#1174)
* Add support for VS CMake/vcpkg compilation

* Fix system_windows.cpp compilation

* Add optimization and hidden console to MSVC release builds
2018-06-04 09:17:51 +02:00
krzys-h 073191d1ea Small CPathManager refactoring 2018-05-16 13:28:06 +02:00
krzys-h 12c969c71c Post-release 0.1.11.1-alpha 2018-05-10 21:20:13 +02:00
krzys-h cdb8a4871a Release 0.1.11.1-alpha: Bump version 2018-05-10 21:20:13 +02:00
krzys_h 8b86a1f222
Merge pull request #1142 from AbigailBuccaneer/Wmissing-declarations
Compile with -Wmissing-declarations
2018-04-24 14:12:43 +02:00
AbigailBuccaneer ea64edaa0b Compile with -Wmissing-declarations
-Wmissing-declarations enforces that every function (except for static
functions) must be declared separately before it's defined. This
essentially enforces that every function must be either static, or
declared in a header elsewhere.

This helps the optimizer, as it can do a better job of inlining if it
knows that a function won't be used outside of a given file. It also
helps -Wunused-function (which is enabled by -Wall) find more unused
functions.

Note that Clang spells this option -Wmissing-prototypes, which
confusingly is the name of a related but different warning option under
GCC.
2018-04-21 16:49:27 +01:00
AbigailBuccaneer 6978c28ee0 Compile with -Wsuggest-override under GCC
Clang by default compiles with -Winconsistent-missing-override, which
warns when a class declares virtual functions that override those in the
base class, and some but not all of them are explicitly declared
`override`.

GCC doesn't support this option, but has a stronger version,
-Wsuggest-override. In combination with -Werror, this means that any
virtual function that overrides another *must* be explicitly declared as
`override`.

This commit enables -Wsuggest-override where available. This means that
GCC users can't break the Clang build with inconsistent overrides (see
 #1113 and #1114) and consequently that any build that passes the pull
request CI build on Jenkins won't break because of inconsistent
overrides.
2018-04-19 19:58:44 +01:00
krzys-h adda82819c Post-release 0.1.11-alpha 2017-11-10 11:01:25 +01:00
krzys-h b5cc7689d1 Release 0.1.11-alpha: Bump version 2017-11-10 11:01:25 +01:00
krzys-h 36cd5eeea9 Post-release 0.1.10-alpha 2017-05-24 14:34:19 +02:00
krzys-h 621911eb64 Release 0.1.10-alpha: Bump version 2017-05-24 14:34:19 +02:00
krzys-h aa1a946336 Make deprecation warnings not an error, see #958 2017-05-23 19:02:17 +02:00
Abigail 11d950221b Fix all compiler warnings and enable -Werror (#955)
This removes all compilation warnings on:
* g++ 4.7.4, 4.8.5, 4.9.4, 5.4.1, 6.3.0, 7.0.1-svn246759
* clang++ 3.9.1, 4.0.0, 5.0.0-svn303007
2017-05-22 11:10:35 +02:00
krzys-h 8764d28e9e Remove remaining "this != nullptr" checks in CBOT, closes #828 2016-11-11 18:03:46 +01:00
krzys-h 81c7d05d7c Post-release 0.1.9-alpha 2016-11-02 21:42:23 +01:00
krzys-h b8d88c97b0 Release 0.1.9-alpha: Bump version 2016-11-02 21:42:23 +01:00
krzys-h 70853f2b86 Add temporary hack for issue #828 2016-11-02 21:38:47 +01:00
Unknown e3b3d7c9aa Enable debug info for MSVC 2016-08-24 18:18:33 +02:00
Unknown e085b4b422 Enable C++ exceptions in MSVC
Because warnings.
2016-08-24 13:34:51 +02:00
MrSimbax 974b6efad5 Add -pedantic-errors flag to C++ compilers 2016-08-18 12:59:29 +02:00
krzys-h aa6345ab5e Post-release 0.1.8-alpha 2016-07-11 09:29:50 +02:00
krzys-h 407d855466 Release 0.1.8-alpha: Bump version 2016-07-11 09:27:53 +02:00
Mateusz Przybył 734e6e97c0 Group source files for IDE projects in CMake
Merge pull request #773 from MrSimbax/msvc-project-org-cmake
2016-05-02 12:14:18 +02:00
Piotr Dziwinski b5438c3ae4 Fix CMake warning when compiling on OSX 2016-04-03 11:34:35 +12:00
krzys-h 02633e32c3 Merge branch 'master' into dev 2016-04-02 23:55:32 +02:00
krzys-h e77f9dbd36 Bump version to 0.1.7b 2016-04-02 23:53:07 +02:00
krzys-h 1c5f47703b Post-release 0.1.7-alpha 2016-03-29 16:08:20 +02:00
krzys-h aa15515837 Release 0.1.7-alpha 2016-03-29 16:06:30 +02:00
krzys-h 2e17712b5d Added official build info in crash screen 2015-12-19 22:10:15 +01:00
krzys-h 6e1504d7a5 Further cleanup USE_SDL_MAIN 2015-09-29 22:39:34 +02:00
krzys-h 53e4470dbf Started SDL2 migration 2015-09-24 21:09:46 +02:00
krzys-h 1440190921 Post-release alpha-0.1.6 2015-09-14 21:15:01 +02:00
krzys-h c475e8c2a6 Release 0.1.6 2015-09-14 21:11:37 +02:00
krzys-h 1519145c4c Added information when no exception object is returned from std::current_exception 2015-08-25 14:01:10 +02:00
krzys-h 0c670e7699 Don't demangle the exception class name on MSVC 2015-08-16 00:44:36 +02:00
krzys-h f21025b526 User-friendly abort error messages 2015-08-16 00:44:36 +02:00
Piotr Dziwinski d703eb7165 Compile fixes for MSVC2013 2015-08-16 00:39:08 +02:00
Piotr Dziwinski 1e4b88a309 Fix using Debug build type by default 2015-07-24 22:56:02 +02:00
Piotr Dziwinski 73536290b2 Fix for incorrect compile flags in colobot-lint 2015-07-19 18:11:12 +02:00
Piotr Dziwinski 9ec289203b Add some CMake code for use with colobot-lint 2015-07-19 17:40:10 +02:00
Piotr Dziwinski 88ec9aaae3 Drop GCC 4.6 support 2015-06-26 00:24:32 +02:00
krzys-h 07ff0bbe20 Post-release alpha-0.1.5 2015-06-10 20:05:32 +02:00
krzys-h 438d5e7431 Release alpha-0.1.5 2015-06-10 20:03:22 +02:00
Piotr Dziwinski ccaac2c544 Rewrite unit tests to use HippoMocks 2015-05-13 00:52:18 +02:00
Piotr Dziwinski 6c87144ae8 Merge branch 'ManuelBlanc-dev-osx' into dev 2015-04-28 15:18:37 -07:00
Piotr Dziwinski 81096fd2ae Fix Clang and GCC 4.6 compilation 2015-04-28 19:29:32 +02:00
Piotr Dziwinski bca9a019ae Suppress some MSVC warnings 2015-04-27 20:02:22 +02:00
Piotr Dziwinski dec12fb977 Use wingetopt library on MSVC 2015-04-27 18:17:03 +02:00
Piotr Dziwinski 3dce58c0fa Replace override and noexcept with macros 2015-04-27 18:07:42 +02:00
Piotr Dziwinski f52650edb5 Add MSVC compiler detection 2015-04-27 18:03:06 +02:00
MBlanc 7bb12511d9 Implemented the OSX clipboard using the AppKit API
The X11 dependency is no longer needed on OSX, and has been removed
2014-12-11 23:31:41 +01:00
krzys-h 28389e1f41 Post-release alpha-0.1.4 2014-11-02 13:38:10 +01:00
krzys-h e2be034ec3 Release alpha-0.1.4 2014-11-02 13:36:48 +01:00
krzys-h 0245fdc6c3 Merge branch 'dev-physfs' into dev
Conflicts:
	src/app/app.cpp
2014-10-19 16:18:36 +02:00
krzys-h 7af92cc4ce Added portable build flag 2014-10-18 20:00:30 +02:00
Piotr Dziwinski 5274acd624 Merge with dev 2014-10-07 22:15:40 +02:00
Piotr Dziwinski 74312b0405 Better CMake organization and unit test cleanups
* created a static library containing most source modules
  to avoid compiling source modules twice in code and unit tests
* moved profile_test to main unit tests executable
* removed image_test and edit_test as not really useful
2014-08-12 20:58:55 +02:00
krzys-h 96d49d84aa Merge branch 'dev' into dev-physfs
Conflicts:
	data
	src/app/gamedata.cpp
	src/ui/control.cpp
	src/ui/edit.cpp
	src/ui/maindialog.cpp
2014-07-11 15:24:44 +02:00
krzys-h c5abf18a57 Post-release 0.1.3-alpha 2014-07-01 21:05:06 +02:00
krzys-h d9fee8b2ad Release 0.1.3-alpha 2014-07-01 12:16:32 +02:00
krzys-h 2b9abf2a48 Fixed CMake git branch detection with build dir outside of repository working dir 2014-06-25 22:49:16 +02:00
Krzysztof Dermont 2260f6bf4f Big part of PhysFS support
* removed -mod argument
* removed -datadir argument
* removed -lang argument
* removed some dead ui code
* added resource manager and file loaders (stream and SDL)
* changed interface textures location to match new directory structure
* removed CGameData for mod support
* added PhysFS support
2014-06-20 23:51:28 +02:00
krzys-h 9a741a66a4 Changed version display in bottom-right corner to be actually version number instead of date 2013-12-27 11:15:36 +01:00
Piotr Dziwinski d9283e2afa Fix problem with gtest and pthread on some systems 2013-12-20 20:19:21 +01:00
Didier Raboud 343fa8f0cb Add a PLATFORM_GNU global variable matching all GNU systems such as Debian's Linux, kFreeBSD and Hurd 2013-11-27 18:53:28 +01:00
Piotr Dziwinski d6eb095f27 Colobot Gold 0.1.2-alpha 2013-11-26 00:42:46 +01:00
Piotr Dziwinski 8c25650ad5 Version bump (0.1.2) 2013-11-26 00:39:44 +01:00
Didier 'OdyX' Raboud 89e2855f95 Consolidate SYSTEM_CPP_MODULE in the main CMakeLists.txt 2013-11-20 10:39:06 +01:00
Didier 'OdyX' Raboud 6b3e6694e3 On MacOSX, install files to Bundle-specific directories 2013-11-13 09:35:32 +01:00
Didier 'OdyX' Raboud ffdba25411 Add MacOSX bundle-specific installation paths 2013-11-13 09:35:32 +01:00
Piotr Dziwinski 881802b050 Fixed version codename (-alpha) 2013-11-03 23:30:25 +01:00
Piotr Dziwinski d8e50e4eeb Version bump (0.1.1) 2013-11-03 13:02:25 +01:00
Didier 'OdyX' Raboud 4680137ca4 On MacOSX, use SDL_Main 2013-10-29 14:54:11 +01:00
Didier 'OdyX' Raboud ee90f02bc4 Add an icon and executable information to the colobot.exe when build in MXE 2013-10-29 14:40:58 +01:00
Piotr Dziwinski 7fb83068ed Fix for CMakeLists error 2013-10-24 21:48:14 +02:00
Piotr Dziwinski 8d62da0c99 Added option to force to use bundled gmock/gtest
* resolves problem when version of gmock/gtest found installed in system
   disagrees with the bundled one
 * removed -DGTEST_HAVE_PTHREAD=0, seems that pthread is needed after all
2013-10-24 21:37:07 +02:00
Didier 'OdyX' Raboud 591ba30a00 Include the OpenAL headers using the "al.h" form, as recommended by its CMake finder script 2013-10-24 21:12:52 +02:00
Didier 'OdyX' Raboud b3b6a40d9e MacOSX: Add initial support in CMake build infra 2013-10-24 21:12:52 +02:00
Piotr Dziwinski a4b3b7d0af Typo fix 2013-06-27 19:43:06 +02:00
Piotr Dziwinski 26870551d7 Forgotten compile flag 2013-06-26 20:44:17 +02:00
Piotr Dziwinski 5c15855009 Post-alpha phase 2013-06-24 21:40:51 +02:00
Piotr Dziwinski b376486fd7 Colobot Gold 0.1.0-alpha 2013-06-24 21:32:14 +02:00
Piotr Dziwinski 81a6de41a5 Some further changes in CMakeLists
* removed DEV_BUILD autodetection (could be confusing)
 * ignore desktop subdirectory on Windows
 * some refactoring
2013-06-24 14:17:28 +02:00
Piotr Dziwinski 3e989c96df Fixed auto-detecting locale on Windows
* localename library is now used to determine the actual locale used
 * added patched version of FindGettext.cmake to fix
   installation path of translation files
2013-06-24 14:16:39 +02:00
Piotr Dziwinski 8cb2e54de8 Futher changes to CMake options
* OpenAL sound is now enabled by default
 * Boost is linked dynamically by default
2013-06-22 22:33:06 +02:00
Piotr Dziwinski bfcce26f89 Changes in build organization
* targets are now created in top-level build directory
 * more things are now configured through CMake options
 * changed debug build detection from NDEBUG to DEV_BUILD
 * moved po and desktop directories
 * moved last unit test out of src directory
2013-06-22 01:17:19 +02:00
Piotr Dziwinski 7874aca10c Enhanced logging, option to auto-start mission
* added logging of application events
 * changed debug mode flag to independent debug modes
 * added option to auto-start mission (load a mission immediately
   after startup)
 * removed "enum value out of range" prints
 * some refactoring
2013-06-16 21:54:36 +02:00
krzys-h c3e95d40a2 Added relative install paths for MXE build 2013-05-03 22:23:36 +02:00
erihel f1873a52d5 * Minor changes to cmake files 2013-04-12 12:07:57 +02:00