Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # GRAPHITE2 LICENSING |
michael@0 | 2 | # |
michael@0 | 3 | # Copyright 2010, SIL International |
michael@0 | 4 | # All rights reserved. |
michael@0 | 5 | # |
michael@0 | 6 | # This library is free software; you can redistribute it and/or modify |
michael@0 | 7 | # it under the terms of the GNU Lesser General Public License as published |
michael@0 | 8 | # by the Free Software Foundation; either version 2.1 of License, or |
michael@0 | 9 | # (at your option) any later version. |
michael@0 | 10 | # |
michael@0 | 11 | # This program is distributed in the hope that it will be useful, |
michael@0 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
michael@0 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
michael@0 | 14 | # Lesser General Public License for more details. |
michael@0 | 15 | # |
michael@0 | 16 | # You should also have received a copy of the GNU Lesser General Public |
michael@0 | 17 | # License along with this library in the file named "LICENSE". |
michael@0 | 18 | # If not, write to the Free Software Foundation, 51 Franklin Street, |
michael@0 | 19 | # Suite 500, Boston, MA 02110-1335, USA or visit their web page on the |
michael@0 | 20 | # internet at http://www.fsf.org/licenses/lgpl.html. |
michael@0 | 21 | |
michael@0 | 22 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) |
michael@0 | 23 | project(graphite2_core) |
michael@0 | 24 | cmake_policy(SET CMP0012 NEW) |
michael@0 | 25 | INCLUDE(CheckCXXSourceCompiles) |
michael@0 | 26 | |
michael@0 | 27 | set(GRAPHITE_API_CURRENT 3) |
michael@0 | 28 | set(GRAPHITE_API_REVISION 0) |
michael@0 | 29 | set(GRAPHITE_API_AGE 1) |
michael@0 | 30 | set(GRAPHITE_VERSION ${GRAPHITE_API_CURRENT}.${GRAPHITE_API_REVISION}.${GRAPHITE_API_AGE}) |
michael@0 | 31 | set(GRAPHITE_SO_VERSION ${GRAPHITE_API_CURRENT}) |
michael@0 | 32 | |
michael@0 | 33 | include(TestBigEndian) |
michael@0 | 34 | |
michael@0 | 35 | include_directories(${PROJECT_SOURCE_DIR}) |
michael@0 | 36 | |
michael@0 | 37 | set(SEGCACHE SegCache.cpp SegCacheEntry.cpp SegCacheStore.cpp) |
michael@0 | 38 | if (GRAPHITE2_NSEGCACHE) |
michael@0 | 39 | add_definitions(-DGRAPHITE2_NSEGCACHE) |
michael@0 | 40 | set(SEGCACHE) |
michael@0 | 41 | endif (GRAPHITE2_NSEGCACHE) |
michael@0 | 42 | |
michael@0 | 43 | set(FILEFACE FileFace.cpp) |
michael@0 | 44 | if (GRAPHITE2_NFILEFACE) |
michael@0 | 45 | add_definitions(-DGRAPHITE2_NFILEFACE) |
michael@0 | 46 | set(FILEFACE) |
michael@0 | 47 | endif (GRAPHITE2_NFILEFACE) |
michael@0 | 48 | |
michael@0 | 49 | set(TRACING json.cpp) |
michael@0 | 50 | if (GRAPHITE2_NTRACING) |
michael@0 | 51 | add_definitions(-DGRAPHITE2_NTRACING) |
michael@0 | 52 | set(TRACING) |
michael@0 | 53 | endif (GRAPHITE2_NTRACING) |
michael@0 | 54 | |
michael@0 | 55 | if (GRAPHITE2_TELEMETRY) |
michael@0 | 56 | add_definitions(-DGRAPHITE2_TELEMETRY) |
michael@0 | 57 | endif (GRAPHITE2_TELEMETRY) |
michael@0 | 58 | |
michael@0 | 59 | set(GRAPHITE_HEADERS |
michael@0 | 60 | ../include/graphite2/Font.h |
michael@0 | 61 | ../include/graphite2/Segment.h |
michael@0 | 62 | ../include/graphite2/Types.h |
michael@0 | 63 | ../include/graphite2/Log.h |
michael@0 | 64 | ) |
michael@0 | 65 | |
michael@0 | 66 | file(GLOB PRIVATE_HEADERS inc/*.h) |
michael@0 | 67 | |
michael@0 | 68 | add_library(graphite2 SHARED |
michael@0 | 69 | ${GRAPHITE2_VM_TYPE}_machine.cpp |
michael@0 | 70 | gr_char_info.cpp |
michael@0 | 71 | gr_features.cpp |
michael@0 | 72 | gr_face.cpp |
michael@0 | 73 | gr_font.cpp |
michael@0 | 74 | gr_logging.cpp |
michael@0 | 75 | gr_segment.cpp |
michael@0 | 76 | gr_slot.cpp |
michael@0 | 77 | Bidi.cpp |
michael@0 | 78 | CachedFace.cpp |
michael@0 | 79 | CmapCache.cpp |
michael@0 | 80 | Code.cpp |
michael@0 | 81 | Face.cpp |
michael@0 | 82 | FeatureMap.cpp |
michael@0 | 83 | Font.cpp |
michael@0 | 84 | GlyphFace.cpp |
michael@0 | 85 | GlyphCache.cpp |
michael@0 | 86 | Justifier.cpp |
michael@0 | 87 | NameTable.cpp |
michael@0 | 88 | Pass.cpp |
michael@0 | 89 | Rule.cpp |
michael@0 | 90 | Segment.cpp |
michael@0 | 91 | Silf.cpp |
michael@0 | 92 | Slot.cpp |
michael@0 | 93 | Sparse.cpp |
michael@0 | 94 | TtfUtil.cpp |
michael@0 | 95 | UtfCodec.cpp |
michael@0 | 96 | ${FILEFACE} |
michael@0 | 97 | ${SEGCACHE} |
michael@0 | 98 | ${TRACING}) |
michael@0 | 99 | |
michael@0 | 100 | set_target_properties(graphite2 PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}" |
michael@0 | 101 | SOVERSION ${GRAPHITE_SO_VERSION} |
michael@0 | 102 | VERSION ${GRAPHITE_VERSION} |
michael@0 | 103 | LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT} |
michael@0 | 104 | LT_VERSION_REVISION ${GRAPHITE_API_REVISION} |
michael@0 | 105 | LT_VERSION_AGE ${GRAPHITE_API_AGE}) |
michael@0 | 106 | |
michael@0 | 107 | if (${CMAKE_BUILD_TYPE} STREQUAL "ClangASN") |
michael@0 | 108 | set(GRAPHITE_LINK_FLAGS "-fsanitize=address") |
michael@0 | 109 | else (${CMAKE_BUILD_TYPE} STREQUAL "ClangASN") |
michael@0 | 110 | set(GRAPHITE_LINK_FLAGS "") |
michael@0 | 111 | endif (${CMAKE_BUILD_TYPE} STREQUAL "ClangASN") |
michael@0 | 112 | |
michael@0 | 113 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
michael@0 | 114 | set_target_properties(graphite2 PROPERTIES |
michael@0 | 115 | COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" |
michael@0 | 116 | LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" |
michael@0 | 117 | LINKER_LANGUAGE C) |
michael@0 | 118 | if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") |
michael@0 | 119 | target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) |
michael@0 | 120 | else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") |
michael@0 | 121 | if (GRAPHITE2_ASAN) |
michael@0 | 122 | target_link_libraries(graphite2 c gcc_s) |
michael@0 | 123 | else (GRAPHITE2_ASAN) |
michael@0 | 124 | target_link_libraries(graphite2 c gcc) |
michael@0 | 125 | endif (GRAPHITE2_ASAN) |
michael@0 | 126 | include(Graphite) |
michael@0 | 127 | nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) |
michael@0 | 128 | endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") |
michael@0 | 129 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") |
michael@0 | 130 | CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") |
michael@0 | 131 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
michael@0 | 132 | |
michael@0 | 133 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
michael@0 | 134 | set_target_properties(graphite2 PROPERTIES |
michael@0 | 135 | COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" |
michael@0 | 136 | LINK_FLAGS "-nodefaultlibs" |
michael@0 | 137 | LINKER_LANGUAGE C) |
michael@0 | 138 | target_link_libraries(graphite2 c) |
michael@0 | 139 | include(Graphite) |
michael@0 | 140 | nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) |
michael@0 | 141 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") |
michael@0 | 142 | CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") |
michael@0 | 143 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
michael@0 | 144 | |
michael@0 | 145 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
michael@0 | 146 | set_target_properties(graphite2 PROPERTIES |
michael@0 | 147 | COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING") |
michael@0 | 148 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
michael@0 | 149 | |
michael@0 | 150 | |
michael@0 | 151 | install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) |
michael@0 | 152 | install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) |