Minor repairs per jriegel/jmaustpc (fixes from wandererfan)
This commit is contained in:
parent
41da5e95e3
commit
c70a39c961
|
@ -326,12 +326,17 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
|
||||||
endmacro(fc_wrap_cpp)
|
endmacro(fc_wrap_cpp)
|
||||||
|
|
||||||
#--------------------FreeType-----------------------
|
#--------------------FreeType-----------------------
|
||||||
|
|
||||||
if(FREECAD_USE_FREETYPE)
|
if(FREECAD_USE_FREETYPE)
|
||||||
find_package(FreeType)
|
find_package(Freetype)
|
||||||
endif(FREECAD_USE_FREETYPE)
|
if(NOT FREETYPE_FOUND)
|
||||||
|
MESSAGE("FreeType2 library is not available. Part module will lack of makeWireString().")
|
||||||
|
endif(NOT FREETYPE_FOUND)
|
||||||
|
endif(FREECAD_USE_FREETYPE)
|
||||||
|
|
||||||
#---------------------------------------------------
|
#---------------------------------------------------
|
||||||
|
|
||||||
if(FREECAD_BUILD_GUI)
|
if(FREECAD_BUILD_GUI)
|
||||||
# -------------------------------- OpenGL --------------------------------
|
# -------------------------------- OpenGL --------------------------------
|
||||||
|
|
||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
# - Locate FreeType library
|
|
||||||
# This module defines
|
|
||||||
# FREETYPE_LIBRARY, the library to link against
|
|
||||||
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
|
|
||||||
# FREETYPE_INCLUDE_DIRS, where to find headers.
|
|
||||||
# This is the concatenation of the paths:
|
|
||||||
# FREETYPE_INCLUDE_DIR_ft2build
|
|
||||||
# FREETYPE_INCLUDE_DIR_freetype2
|
|
||||||
#
|
|
||||||
# $FREETYPE_DIR is an environment variable that would
|
|
||||||
# correspond to the ./configure --prefix=$FREETYPE_DIR
|
|
||||||
# used in building FREETYPE.
|
|
||||||
# Created by Eric Wing.
|
|
||||||
|
|
||||||
# Ugh, FreeType seems to use some #include trickery which
|
|
||||||
# makes this harder than it should be. It looks like they
|
|
||||||
# put ft2build.h in a common/easier-to-find location which
|
|
||||||
# then contains a #include to a more specific header in a
|
|
||||||
# more specific location (#include <freetype/config/ftheader.h>).
|
|
||||||
# Then from there, they need to set a bunch of #define's
|
|
||||||
# so you can do something like:
|
|
||||||
# #include FT_FREETYPE_H
|
|
||||||
# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
|
|
||||||
# wants explicit full paths and this trickery doesn't work too well.
|
|
||||||
# I'm going to attempt to cut out the middleman and hope
|
|
||||||
# everything still works.
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
|
||||||
PATHS
|
|
||||||
$ENV{FREETYPE_DIR}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
|
||||||
PATHS
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/usr/local/X11R6
|
|
||||||
/usr/local/X11
|
|
||||||
/usr/X11R6
|
|
||||||
/usr/X11
|
|
||||||
/sw
|
|
||||||
/opt/local
|
|
||||||
/opt/csw
|
|
||||||
/opt
|
|
||||||
/usr/freeware
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
|
||||||
$ENV{FREETYPE_DIR}/include/freetype2
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
PATH_SUFFIXES include/freetype2
|
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
|
||||||
/usr/local/include/freetype2
|
|
||||||
/usr/include/freetype2
|
|
||||||
/usr/local/X11R6/include/freetype2
|
|
||||||
/usr/local/X11/include/freetype2
|
|
||||||
/usr/X11R6/include/freetype2
|
|
||||||
/usr/X11/include/freetype2
|
|
||||||
/sw/include/freetype2
|
|
||||||
/opt/local/include/freetype2
|
|
||||||
/opt/csw/include/freetype2
|
|
||||||
/opt/include/freetype2
|
|
||||||
/usr/freeware/include/freetype2
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
|
||||||
NAMES freetype libfreetype freetype219
|
|
||||||
PATHS
|
|
||||||
$ENV{FREETYPE_DIR}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
PATH_SUFFIXES lib64 lib
|
|
||||||
)
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
|
||||||
NAMES freetype libfreetype freetype219
|
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
PATH_SUFFIXES lib64 lib
|
|
||||||
)
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
|
||||||
NAMES freetype libfreetype freetype219
|
|
||||||
PATHS
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/usr/local/X11R6
|
|
||||||
/usr/local/X11
|
|
||||||
/usr/X11R6
|
|
||||||
/usr/X11
|
|
||||||
/sw
|
|
||||||
/opt/local
|
|
||||||
/opt/csw
|
|
||||||
/opt
|
|
||||||
/usr/freeware
|
|
||||||
PATH_SUFFIXES lib64 lib
|
|
||||||
)
|
|
||||||
|
|
||||||
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
|
||||||
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
|
||||||
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
|
||||||
|
|
||||||
|
|
||||||
SET(FREETYPE_FOUND "NO")
|
|
||||||
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
|
||||||
SET(FREETYPE_FOUND "YES")
|
|
||||||
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
|
||||||
|
|
||||||
|
|
|
@ -1589,7 +1589,7 @@ struct PyMethodDef Part_methods[] = {
|
||||||
"makeLoft(list of wires) -- Create a loft shape."},
|
"makeLoft(list of wires) -- Create a loft shape."},
|
||||||
|
|
||||||
{"makeWireString" ,makeWireString ,METH_VARARGS,
|
{"makeWireString" ,makeWireString ,METH_VARARGS,
|
||||||
"makeWireString(fontdir,fontfile,string,height,[track]) -- Make list of wires in the form of a string's characters."},
|
"makeWireString(string,fontdir,fontfile,height,[track]) -- Make list of wires in the form of a string's characters."},
|
||||||
|
|
||||||
{"cast_to_shape" ,cast_to_shape,METH_VARARGS,
|
{"cast_to_shape" ,cast_to_shape,METH_VARARGS,
|
||||||
"cast_to_shape(shape) -- Cast to the actual shape type"},
|
"cast_to_shape(shape) -- Cast to the actual shape type"},
|
||||||
|
|
|
@ -1,8 +1,33 @@
|
||||||
//$$INSERT legal.txt
|
/***************************************************************************
|
||||||
|
* Copyright (c) wandererfan <wandererfan (at) gmail.com> 2013 *
|
||||||
|
* *
|
||||||
|
* This file is part of the FreeCAD CAx development system. *
|
||||||
|
* *
|
||||||
|
* This library is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU Library General Public *
|
||||||
|
* License as published by the Free Software Foundation; either *
|
||||||
|
* version 2 of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This library is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU Library General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Library General Public *
|
||||||
|
* License along with this library; see the file COPYING.LIB. If not, *
|
||||||
|
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||||
|
* Suite 330, Boston, MA 02111-1307, USA *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
/***************************************************************************
|
||||||
|
* FreeType License (FTL) credit: *
|
||||||
|
* Portions of this software are copyright (c) <1996-2011> The FreeType *
|
||||||
|
* Project (www.freetype.org). All rights reserved. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifdef FCUseFreeType
|
#ifdef FCUseFreeType
|
||||||
|
|
||||||
|
|
||||||
#include "PreCompiled.h"
|
#include "PreCompiled.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -1,3 +1,31 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* Copyright (c) wandererfan <wandererfan (at) gmail.com> 2013 *
|
||||||
|
* *
|
||||||
|
* This file is part of the FreeCAD CAx development system. *
|
||||||
|
* *
|
||||||
|
* This library is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU Library General Public *
|
||||||
|
* License as published by the Free Software Foundation; either *
|
||||||
|
* version 2 of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This library is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU Library General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Library General Public *
|
||||||
|
* License along with this library; see the file COPYING.LIB. If not, *
|
||||||
|
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||||
|
* Suite 330, Boston, MA 02111-1307, USA *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
/***************************************************************************
|
||||||
|
* FreeType License (FTL) credit: *
|
||||||
|
* Portions of this software are copyright (c) <1996-2011> The FreeType *
|
||||||
|
* Project (www.freetype.org). All rights reserved. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// Public header for FT2FC.cpp
|
// Public header for FT2FC.cpp
|
||||||
#ifndef FT2FC_H
|
#ifndef FT2FC_H
|
||||||
#define FT2FC_H
|
#define FT2FC_H
|
||||||
|
|
|
@ -11,6 +11,7 @@ SET(Test_SRCS
|
||||||
Workbench.py
|
Workbench.py
|
||||||
unittestgui.py
|
unittestgui.py
|
||||||
InitGui.py
|
InitGui.py
|
||||||
|
testmakeWireString.py
|
||||||
)
|
)
|
||||||
SOURCE_GROUP("" FILES ${Test_SRCS})
|
SOURCE_GROUP("" FILES ${Test_SRCS})
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ String = 'FreeCAD' # ASCII
|
||||||
#FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
#FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
||||||
#FontName = 'Times_New_Roman_Italic.ttf'
|
#FontName = 'Times_New_Roman_Italic.ttf'
|
||||||
FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
||||||
#FontName = 'Arial.ttf'
|
FontName = 'Arial.ttf'
|
||||||
FontName = 'NOTArial.ttf' # font file not found error
|
#FontName = 'NOTArial.ttf' # font file not found error
|
||||||
#FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
#FontPath = '/usr/share/fonts/truetype/msttcorefonts/'
|
||||||
#FontName = 'ariali.ttf' #symlink to ttf
|
#FontName = 'ariali.ttf' #symlink to ttf
|
||||||
#FontPath = '/usr/share/fonts/truetype/'
|
#FontPath = '/usr/share/fonts/truetype/'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user