Commit Graph

50 Commits (ea1bc851c55d7b1b48750db373a37c2f4f054338)

Author SHA1 Message Date
orbea 9dc55ca3c4 cmake: Don't install .gitignore files. 2019-10-09 13:41:44 +02:00
Andrew Copland 5b20e2e08c
Merge pull request #4664 from pcercuei/fix-appveyor
CMake: Ship Debian's FindGLEW.cmake script
2019-08-10 14:47:01 +01:00
Paul Cercueil a3a932ac4d
CMake: Ship Debian's FindGLEW.cmake script
This will be used only when compiling under MinGW, since MinGW's GLEW
config script seems to be really broken.

Fixes #4662.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-08-10 14:36:58 +02:00
Paul Cercueil 86ccb5cd7b
CMake: Fix indentation
No functional change, just code cleanup.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-08-05 13:51:43 +02:00
Andrew Copland 3b5bade43b
Fix VS CMake (#4649)
Enable multithreaded compilation for VS, prevent it Optimizing the models per-build, fix up the pioneer-thirdparty paths, GLOB the header files, copy the DLLs needed for visual studio, Changed the appveyor MSVC prepare script
2019-07-29 11:05:42 +01:00
Paul Cercueil 74108bd0d8
Autodetect availability of FPE ops
Use CMake to detect the availability of feclearexcept, feenableexcept,
fedisableexcept.

Fixes #4645.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-20 12:15:09 -04:00
Webster Sheets a7da158e53
Merge branch 'master' into startup-time 2019-07-08 00:28:43 -04:00
Paul Cercueil 29dc6f8ca2 CMake: Support MSVC build using thirdparty repo
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-03 11:00:43 +02:00
Paul Cercueil 805ce73fdd CMake: Only use pioneer-thirdparty on MSVC
On all platforms (Windows, Linux, OSX), the automated builds and build
instructions don't use the pioneer-thirdparty repo. It's only ever
useful on Windows when building with Visual Studio.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-03 11:00:43 +02:00
Paul Cercueil 4b161eb3a6 Fix build under Visual Studio 2017
Add a few defines and make 'main' functions extern "C" (see SDL_main.h)
to fix the build under Visual Studio 2017.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-03 11:00:43 +02:00
Paul Cercueil 2cb2d2979e CMake: Remove useless dependency on libpng
Libpng is a dependency of SDL2_image, not a direct dependency, so we
don't need to link against it.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-06-26 10:59:41 +02:00
Webster Sheets 0a83956014 Finish refactoring Serializer, add LZ4 compression for SGM files. 2019-06-21 11:24:02 -04:00
Webster Sheets 09a84e6694 Better profiling, speedup model saving / loading. 2019-06-17 18:14:27 -04:00
vakhoir b722c1e9d7 PiGui PersonalInformation view
Allow passing flags to child windows
Add ImageButtons that don't stretch the icon
2019-05-20 20:52:03 +02:00
Paul Cercueil e2378eb94c CMake: Search libraries in their directories
Fixes the build on OSX.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-03-24 18:05:44 +01:00
Paul Cercueil a6bbfe3840 CMake: Fix GLEW headers not included
Fixes the build on OSX.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-03-24 18:04:21 +01:00
Webster Sheets c815e4aba9 Refactor sound code to it's own folder, delete Pi::BoinkNoise. 2019-03-10 16:45:34 -04:00
Webster Sheets 34e896550a Split view controller to it's own class, added InputFrame code.
This conforms better to the new Input paradigm, and fixes a number of bugs
relating to the ship view incorrectly rotating while in another view.
2019-03-10 21:42:11 +01:00
Webster Sheets f1d674342e Upgrade travis to Xenial, add OSX compilation. 2019-02-17 00:09:24 -05:00
Andrew Copland 04c698d41b
Also install DDS and PNG files 2019-02-08 13:17:10 +00:00
Paul Cercueil 942389d4ed CMake: only install precompiled models
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-02-08 10:24:11 +01:00
Paul Cercueil 405c53df88 CMake: Require external modelcompiler when cross-compiling
Fixes #4526.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-02-08 10:23:05 +01:00
Andrew Copland 9931b31968
Merge pull request #4512 from pcercuei/install-metadata
Install metadata (.desktop, appstream.xml, PNG icons)
2019-01-21 13:28:49 +00:00
Paul Cercueil c0f820fa52 Faster build after commit (#4514)
* Fix last formatting errors

Obtained by running clang-format on all *.cpp *.h files present in the
src/ directory and its subfolders.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>

* CMake: Replace src/buildopts.h with a generated version

This has two benefits:
- The options WITH_OBJECTVIEWER and WITH_DEVKEYS are no more hardcoded,
  and can be deselected in the configuration of CMake;
- The PIONEER_VERSION and PIONEER_EXTRAVERSION are no more passed inside
  CPPFLAGS. Before, commiting changes meant that PIONEER_EXTRAVERSION
  was updated to the new git tag, which meant that the whole sources had
  to be recompiled again.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>

* Don't include buildopts.h fom libs.h

Virtually all sources files include libs.h. If libs.h includes
buildopts.h, all the sources will be recompiled if one macro changes in
buildopts.h, and we don't want that.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>

* Avoid including buildopts.h in headers

Without it, a lot of source files will be recompiled when buildopts.h
is updated.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-01-21 09:19:07 +00:00
orbea 74c152d830 Revert "cmake: Add missing DESTDIR."
This reverts commit b97fe61476.
2019-01-06 10:59:20 +01:00
Paul Cercueil 9d5ca5890e CMake: Install PNG icon files too
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-01-05 20:22:33 -03:00
Paul Cercueil 8d2447099d CMake: on UNIX, install .desktop and appdata files
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-01-05 20:21:49 -03:00
orbea b97fe61476 cmake: Add missing DESTDIR.
This will be installed directly to the file system even when DESTDIR
is used.
2019-01-03 17:29:17 -08:00
Webster Sheets b6538b1218 Use dummy videodriver for modelcompiler. 2019-01-03 20:23:50 +01:00
orbea bca9f6ec35 cmake: Test for a .git directory.
This prevents the following error when git is found and the source
directory is not a git repo.

  fatal: not a git repository (or any parent up to mount point /)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
2019-01-03 15:22:05 +01:00
Paul Cercueil f0e6efe4e3 CMake: Fix linking with shlwapi on Windows
target_link_libraries() cannot be given more than one target.

Also, all binaries must be linked to shlwapi, including savegamedump.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil 9837786cea CMake: Optimize models after modelcompiler is built
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil e8a4c9fddd Add script for creating installer with Inno Setup
This script can be used to generate an executable package file that will
install Pioneer into the users' system.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil 9cdecc8283 CMake: Compile meta-data information and icon file on Windows
The meta-data will give information about the program, such as its
license, version, and description.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil 5003ec214c CMake: Fix handling of PIONEER_DATA_DIR
The PIONEER_DATA_DIR option, which was already in use in the CMake
script, is now present in the CMake UI like it should.

CMake will now install the data files inside the path specified
by PIONEER_DATA_DIR, instead of a hardcoded path.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:06 +01:00
Paul Cercueil 70153621ab CMake: Install DLL dependencies on Windows
The Windows build of Pioneer is linked dynamically to the DLLs of its
dependencies. For Pioneer to work correctly, these DLLs need to be
present in the system. We then make sure that when Pioneer is installed,
these DLLs are copied to the executable's directory.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 01:10:50 +01:00
Paul Cercueil fdc46b53ce CMake: Install binary not in "bin" folder on Windows
The bin/etc/share/var etc. separation is a UNIX thing, we don't need to
do that when building for Windows.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 01:10:46 +01:00
Webster Sheets 2ae112ba48 Disable colored output on travis, use static libraries when using pioneer_thirdparty. 2018-11-05 20:06:09 -05:00
Webster Sheets 0846c0f6b3 Change the job name, remove git leftovers. 2018-11-05 19:32:05 -05:00
Webster Sheets 681ac6a709 Switch to CMake builds.
Maybe possibly fix linking errors?
2018-11-05 18:35:48 -05:00
Webster Sheets ada77a695d Switch travis builds to CMake. 2018-11-05 18:34:44 -05:00
Webster Sheets 3a3a13edec Update pioneer to use the new save system. 2018-10-11 11:45:57 -04:00
Andrew Copland 80ceec9b7f Remove OpenGL 2.1 code from the project 2018-09-16 11:02:02 +01:00
Webster Sheets d14bcdc71d Update CMakeLists.txt to build the modelcompiler. 2018-09-14 17:41:40 -04:00
Paul Cercueil f090239ea4 CMake: Use libOpenGL.so instead of libGL.so when both are available
Set policy CMP0072 to tell CMake to use libOpenGL.so instead of the
(deprecated filename) libGL.so.

This avoids a configuration warning when both filenames are found.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-09-02 16:38:01 +01:00
Paul Cercueil 3be4a81239 CMake: Make GLEW as external target when using the system one
This avoids an error when USE_SYSTEM_LIBGLEW is OFF then ON from the
GUI of CMake.

Fixes #4409.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-09-02 15:38:14 +01:00
John Bartholomew 5af8061ee8 Fix bundled vs. external GLEW build configuration options
The normal system include path (on Linux) for GLEW is
/usr/include/GL/glew.h (and the other headers). Previously the code here
has included glew/glew.h, which is incompatible with using the system
GLEW library.
Instead, we need to include GL/glew.h as expected and change the include
path in the build commands as needed depending on whether the system
directory or the bundled GLEW is being used.

It's a little tricky to ensure that we actually get the header from the
correct place for both build configurations, because when we're using
the bundled GLEW configuration /usr/include/ (or the standard include
path) will still be on the include path, so *both* the system glew.h
and the bundled glew.h will be available in the search path. We
just have to rely on the include flag order being right and the compiler
preferring include paths from flags to system include paths.

It should be fine... but it's a pain to actually test that it's correct.
2018-08-26 22:01:30 +01:00
Paul Cercueil 318867e18e Add CMake build system
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-08-25 16:23:42 +01:00
tom d54e935a2d deleted CMake build scripts. they have become out-of-date and I'm not sure why I would keep two different build systems for unix 2011-02-07 00:13:26 +08:00
John Bartholomew 7630c59832 Set up a CMake build system.
- CMake modules to find external dependencies are in CMakeModules.
- Executables are output to bin/
- Object file archives are output to lib/
- Currently, it's set up to be configured within build/debug and
  build/release (or more generally, build/{build-type}); configuring
  from other directories is untested.
- build/, bin/ and lib/ have been added to the .gitignore list.
2010-10-27 15:18:38 +01:00