| 1 |
if(CMAKE_COMPILER_IS_GNUCXX) |
|---|
| 2 |
set(CMAKE_C_FLAGS "-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fPIC") |
|---|
| 3 |
set(CMAKE_CXX_FLAGS "-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fvisibility-inlines-hidden -fPIC") |
|---|
| 4 |
if(ENABLE_DEBUG) |
|---|
| 5 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O1") |
|---|
| 6 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O1") |
|---|
| 7 |
else(ENABLE_DEBUG) |
|---|
| 8 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
|---|
| 9 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") |
|---|
| 10 |
endif(ENABLE_DEBUG) |
|---|
| 11 |
else(CMAKE_COMPILER_IS_GNUCXX) |
|---|
| 12 |
message(STATUS "Flag for Windows compiler is not implemented") |
|---|
| 13 |
endif(CMAKE_COMPILER_IS_GNUCXX) |
|---|
| 14 |
|
|---|
| 15 |
add_definitions(-DWTF_CHANGES) |
|---|
| 16 |
|
|---|
| 17 |
if(USE_I18N_QT) |
|---|
| 18 |
add_definitions(-DWTF_USE_QT4_UNICODE=1) |
|---|
| 19 |
else(USE_I18N_QT) |
|---|
| 20 |
add_definitions(-DWTF_USE_ICU_UNICODE=1) |
|---|
| 21 |
endif(USE_I18N_QT) |
|---|
| 22 |
|
|---|
| 23 |
if(USE_NETWORK_CURL) |
|---|
| 24 |
add_definitions(-DWTF_USE_CURL=1) |
|---|
| 25 |
|
|---|
| 26 |
if(USE_NETWORK_CURL_OPENSSL) |
|---|
| 27 |
add_definitions(-DWTF_USE_CURL_OPENSSL=1) |
|---|
| 28 |
endif(USE_NETWORK_CURL_OPENSSL) |
|---|
| 29 |
|
|---|
| 30 |
endif(USE_NETWORK_CURL) |
|---|
| 31 |
|
|---|
| 32 |
if(USE_NETWORK_SOUP) |
|---|
| 33 |
add_definitions(-DWTF_USE_SOUP=1) |
|---|
| 34 |
endif(USE_NETWORK_SOUP) |
|---|
| 35 |
|
|---|
| 36 |
if(ENABLE_3D_RENDERING) |
|---|
| 37 |
add_definitions(-DENABLE_3D_RENDERING) |
|---|
| 38 |
endif(ENABLE_3D_RENDERING) |
|---|
| 39 |
|
|---|
| 40 |
if(ENABLE_ACCESSIBILITY) |
|---|
| 41 |
add_definitions(-DHAVE_ACCESSIBILITY) |
|---|
| 42 |
endif(ENABLE_ACCESSIBILITY) |
|---|
| 43 |
|
|---|
| 44 |
if(NOT ENABLE_DEBUG) |
|---|
| 45 |
add_definitions(-DNDEBUG) |
|---|
| 46 |
endif(NOT ENABLE_DEBUG) |
|---|
| 47 |
if(NOT ENABLE_FAST_MALLOC) |
|---|
| 48 |
add_definitions(-DUSE_SYSTEM_MALLOC) |
|---|
| 49 |
endif(NOT ENABLE_FAST_MALLOC) |
|---|
| 50 |
|
|---|
| 51 |
if(ENABLE_JIT_JSC) |
|---|
| 52 |
add_definitions(-DENABLE_JIT) |
|---|
| 53 |
add_definitions(-DENABLE_JIT_OPTIMIZE_ARITHMETIC) |
|---|
| 54 |
add_definitions(-DENABLE_JIT_OPTIMIZE_CALL) |
|---|
| 55 |
add_definitions(-DENABLE_JIT_OPTIMIZE_METHOD_CALLS) |
|---|
| 56 |
add_definitions(-DENABLE_JIT_OPTIMIZE_NATIVE_CALL) |
|---|
| 57 |
add_definitions(-DENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS) |
|---|
| 58 |
add_definitions(-DWTF_USE_JIT_STUB_ARGUMENT_VA_LIST) |
|---|
| 59 |
endif(ENABLE_JIT_JSC) |
|---|
| 60 |
|
|---|
| 61 |
if(ENABLE_OWB_TRACES) |
|---|
| 62 |
add_definitions(-DENABLE_OWB_TRACES=1) |
|---|
| 63 |
endif(ENABLE_OWB_TRACES) |
|---|
| 64 |
|
|---|
| 65 |
if(ENABLE_YARR) |
|---|
| 66 |
add_definitions(-DENABLE_YARR) |
|---|
| 67 |
endif(ENABLE_YARR) |
|---|
| 68 |
|
|---|
| 69 |
if (ENABLE_JIT_JSC AND ENABLE_YARR) |
|---|
| 70 |
add_definitions(-DENABLE_YARR_JIT) |
|---|
| 71 |
endif (ENABLE_JIT_JSC AND ENABLE_YARR) |
|---|
| 72 |
|
|---|
| 73 |
if(ENABLE_MULTIPLE_THREADS) |
|---|
| 74 |
add_definitions(-DENABLE_JSC_MULTIPLE_THREADS=1) |
|---|
| 75 |
add_definitions(-DHAVE_POSIX_MEMALIGN=1) |
|---|
| 76 |
endif(ENABLE_MULTIPLE_THREADS) |
|---|
| 77 |
|
|---|
| 78 |
if(ENABLE_NPAPI) |
|---|
| 79 |
if(USE_GRAPHICS_GTK OR USE_GRAPHICS_QT) |
|---|
| 80 |
add_definitions(-DWTF_PLATFORM_X11=1) |
|---|
| 81 |
endif(USE_GRAPHICS_GTK OR USE_GRAPHICS_QT) |
|---|
| 82 |
add_definitions(-DXP_UNIX) |
|---|
| 83 |
add_definitions(-DENABLE_PLUGIN_PACKAGE_SIMPLE_HASH=1) |
|---|
| 84 |
add_definitions(-DENABLE_NETSCAPE_PLUGIN_API=1) |
|---|
| 85 |
else(ENABLE_NPAPI) |
|---|
| 86 |
#ugly hack due to a definition in wtf/Platform.h |
|---|
| 87 |
add_definitions(-DENABLE_NETSCAPE_PLUGIN_API=0) |
|---|
| 88 |
endif(ENABLE_NPAPI) |
|---|
| 89 |
|
|---|
| 90 |
if(ENABLE_SVG) |
|---|
| 91 |
add_definitions(-DENABLE_SVG=1) |
|---|
| 92 |
endif(ENABLE_SVG) |
|---|
| 93 |
|
|---|
| 94 |
if(ENABLE_SVG_ANIMATION) |
|---|
| 95 |
add_definitions(-DENABLE_SVG_ANIMATION=1) |
|---|
| 96 |
endif(ENABLE_SVG_ANIMATION) |
|---|
| 97 |
|
|---|
| 98 |
if(ENABLE_SVG_AS_IMAGE) |
|---|
| 99 |
add_definitions(-DENABLE_SVG_AS_IMAGE=1) |
|---|
| 100 |
endif(ENABLE_SVG_AS_IMAGE) |
|---|
| 101 |
|
|---|
| 102 |
if(ENABLE_FILTERS) |
|---|
| 103 |
add_definitions(-DENABLE_FILTERS=1) |
|---|
| 104 |
endif(ENABLE_FILTERS) |
|---|
| 105 |
|
|---|
| 106 |
if(ENABLE_SVG_FONTS) |
|---|
| 107 |
add_definitions(-DENABLE_SVG_FONTS=1) |
|---|
| 108 |
endif(ENABLE_SVG_FONTS) |
|---|
| 109 |
|
|---|
| 110 |
if(ENABLE_SVG_FOREIGN_OBJECT) |
|---|
| 111 |
add_definitions(-DENABLE_SVG_FOREIGN_OBJECT=1) |
|---|
| 112 |
endif(ENABLE_SVG_FOREIGN_OBJECT) |
|---|
| 113 |
|
|---|
| 114 |
if(ENABLE_SVG_USE_ELEMENT) |
|---|
| 115 |
add_definitions(-DENABLE_SVG_USE=1) |
|---|
| 116 |
endif(ENABLE_SVG_USE_ELEMENT) |
|---|
| 117 |
|
|---|
| 118 |
if(ENABLE_TILED_BACKING_STORE) |
|---|
| 119 |
add_definitions(-DENABLE_TILED_BACKING_STORE=1) |
|---|
| 120 |
endif(ENABLE_TILED_BACKING_STORE) |
|---|
| 121 |
|
|---|
| 122 |
if(NOT USE_FONTS_EMBEDDED) |
|---|
| 123 |
add_definitions(-DUSE_FREETYPE=1) |
|---|
| 124 |
endif(NOT USE_FONTS_EMBEDDED) |
|---|
| 125 |
|
|---|
| 126 |
if(USE_GRAPHICS_GTK) |
|---|
| 127 |
add_definitions(-DBUILDING_GTK__=1) |
|---|
| 128 |
add_definitions(-DBUILDING_CAIRO__=1) |
|---|
| 129 |
endif(USE_GRAPHICS_GTK) |
|---|
| 130 |
|
|---|
| 131 |
if(USE_GRAPHICS_QT) |
|---|
| 132 |
add_definitions(-DBUILDING_QT__=1) |
|---|
| 133 |
# add_definitions(-DQT_NO_CURSOR=1) |
|---|
| 134 |
endif(USE_GRAPHICS_QT) |
|---|
| 135 |
|
|---|
| 136 |
if(USE_GRAPHICS_SDL) |
|---|
| 137 |
add_definitions(-DWTF_PLATFORM_SDL=1) |
|---|
| 138 |
add_definitions(-DWTF_PLATFORM_BAL=1) |
|---|
| 139 |
endif(USE_GRAPHICS_SDL) |
|---|
| 140 |
|
|---|
| 141 |
if(USE_GRAPHICS_SDLCAIRO) |
|---|
| 142 |
add_definitions(-DWTF_PLATFORM_SDLCAIRO=1) |
|---|
| 143 |
add_definitions(-DWTF_PLATFORM_BAL=1) |
|---|
| 144 |
add_definitions(-DWTF_PLATFORM_CAIRO=1) |
|---|
| 145 |
add_definitions(-DUSE_FREETYPE=1) |
|---|
| 146 |
endif(USE_GRAPHICS_SDLCAIRO) |
|---|
| 147 |
|
|---|
| 148 |
if(USE_GRAPHICS_AMIGAOS4) |
|---|
| 149 |
add_definitions(-DBUILDING_CAIRO__=1) |
|---|
| 150 |
add_definitions(-DWTF_PLATFORM_BAL=1) |
|---|
| 151 |
endif(USE_GRAPHICS_AMIGAOS4) |
|---|
| 152 |
|
|---|
| 153 |
if(USE_I18N_GENERIC) |
|---|
| 154 |
add_definitions(-DWTF_USE_BALI18N=1) |
|---|
| 155 |
endif(USE_I18N_GENERIC) |
|---|
| 156 |
|
|---|
| 157 |
if(USE_THREADS_PTHREADS) |
|---|
| 158 |
add_definitions(-DWTF_USE_PTHREADS=1) |
|---|
| 159 |
add_definitions(-DHAVE_PTHREAD_RWLOCK=1) |
|---|
| 160 |
endif(USE_THREADS_PTHREADS) |
|---|
| 161 |
|
|---|
| 162 |
if(NOT IGNORE_CUSTOMER) |
|---|
| 163 |
include(Customer/AddCustomerCompilerFlags OPTIONAL) |
|---|
| 164 |
endif(NOT IGNORE_CUSTOMER) |
|---|
| 165 |
include(AddGlobalCEHTMLCompilerFlags OPTIONAL) |
|---|
| 166 |
include(AddGlobalDAECompilerFlags OPTIONAL) |
|---|