Remove most dependencies on config.h.
The only thing we need it anymore is the package version and platform configuration, so only include it for that. As a result, less files are rebuilt when the git commit changes and config.h is regenerated.
This commit is contained in:
parent
369b0a378c
commit
d3f2ac7513
|
@ -192,7 +192,6 @@ else() # Linux and compatible systems
|
||||||
pkg_check_modules(JSONC REQUIRED json-c)
|
pkg_check_modules(JSONC REQUIRED json-c)
|
||||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||||
|
|
||||||
set(HAVE_GTK TRUE)
|
|
||||||
if(GUI STREQUAL "gtk3")
|
if(GUI STREQUAL "gtk3")
|
||||||
set(HAVE_GTK3 TRUE)
|
set(HAVE_GTK3 TRUE)
|
||||||
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0 pangomm-1.4 x11)
|
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0 pangomm-1.4 x11)
|
||||||
|
|
|
@ -5,18 +5,13 @@
|
||||||
*
|
*
|
||||||
* Copyright 2008-2013 Jonathan Westhues.
|
* Copyright 2008-2013 Jonathan Westhues.
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_STDINT_H
|
#include <stdint.h>
|
||||||
# include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <slvs.h>
|
#include <slvs.h>
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ elseif(APPLE)
|
||||||
|
|
||||||
set(platform_LIBRARIES
|
set(platform_LIBRARIES
|
||||||
${APPKIT_LIBRARY})
|
${APPKIT_LIBRARY})
|
||||||
elseif(HAVE_GTK)
|
elseif(HAVE_GTK2 OR HAVE_GTK3)
|
||||||
set(platform_SOURCES
|
set(platform_SOURCES
|
||||||
platform/gtkmain.cpp
|
platform/gtkmain.cpp
|
||||||
render/rendergl.cpp
|
render/rendergl.cpp
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
/* Do we have the si library on win32, or libspnav on *nix? */
|
/* Do we have the si library on win32, or libspnav on *nix? */
|
||||||
#cmakedefine HAVE_SPACEWARE
|
#cmakedefine HAVE_SPACEWARE
|
||||||
|
|
||||||
#cmakedefine HAVE_GTK
|
|
||||||
#cmakedefine HAVE_GTK2
|
#cmakedefine HAVE_GTK2
|
||||||
#cmakedefine HAVE_GTK3
|
#cmakedefine HAVE_GTK3
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
// Copyright 2008-2013 Jonathan Westhues.
|
// Copyright 2008-2013 Jonathan Westhues.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "solvespace.h"
|
#include "solvespace.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#define mView (&GraphicsWindow::MenuView)
|
#define mView (&GraphicsWindow::MenuView)
|
||||||
#define mEdit (&GraphicsWindow::MenuEdit)
|
#define mEdit (&GraphicsWindow::MenuEdit)
|
||||||
|
@ -85,7 +84,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
|
||||||
{ 1, NULL, Command::NONE, 0, TN, NULL },
|
{ 1, NULL, Command::NONE, 0, TN, NULL },
|
||||||
{ 1, "Dimensions in &Inches", Command::UNITS_INCHES, 0, TR, mView },
|
{ 1, "Dimensions in &Inches", Command::UNITS_INCHES, 0, TR, mView },
|
||||||
{ 1, "Dimensions in &Millimeters", Command::UNITS_MM, 0, TR, mView },
|
{ 1, "Dimensions in &Millimeters", Command::UNITS_MM, 0, TR, mView },
|
||||||
#if defined(HAVE_GTK) || defined(__APPLE__)
|
#if defined(__unix__) || defined(__APPLE__)
|
||||||
{ 1, NULL, Command::NONE, 0, TN, NULL },
|
{ 1, NULL, Command::NONE, 0, TN, NULL },
|
||||||
{ 1, "&Full Screen", Command::FULL_SCREEN, C|F(11), TC, mView },
|
{ 1, "&Full Screen", Command::FULL_SCREEN, C|F(11), TC, mView },
|
||||||
#endif
|
#endif
|
||||||
|
@ -697,7 +696,7 @@ void GraphicsWindow::EnsureValidActives() {
|
||||||
CheckMenuByCmd(Command::SHOW_TOOLBAR, /*checked=*/SS.showToolbar);
|
CheckMenuByCmd(Command::SHOW_TOOLBAR, /*checked=*/SS.showToolbar);
|
||||||
CheckMenuByCmd(Command::PERSPECTIVE_PROJ, /*checked=*/SS.usePerspectiveProj);
|
CheckMenuByCmd(Command::PERSPECTIVE_PROJ, /*checked=*/SS.usePerspectiveProj);
|
||||||
CheckMenuByCmd(Command::SHOW_GRID,/*checked=*/SS.GW.showSnapGrid);
|
CheckMenuByCmd(Command::SHOW_GRID,/*checked=*/SS.GW.showSnapGrid);
|
||||||
#if defined(HAVE_GTK) || defined(__APPLE__)
|
#if defined(__unix__) || defined(__APPLE__)
|
||||||
CheckMenuByCmd(Command::FULL_SCREEN, /*checked=*/FullScreenIsActive());
|
CheckMenuByCmd(Command::FULL_SCREEN, /*checked=*/FullScreenIsActive());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "solvespace.h"
|
#include "solvespace.h"
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
using SolveSpace::dbp;
|
using SolveSpace::dbp;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//
|
//
|
||||||
// Copyright 2016 whitequark
|
// Copyright 2016 whitequark
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "config.h"
|
|
||||||
#include "solvespace.h"
|
#include "solvespace.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
Loading…
Reference in New Issue
Block a user