OLD | NEW |
1 { | 1 { |
2 'includes': ['libadblockplus/common.gypi', 'libadblockplus/third_party/googlet
est.gyp'], | 2 'variables': { |
3 | 3 'build_type%': 'devbuild', |
4 'targets': [{ | 4 'build_version%': '', |
5 'target_name': 'tests', | 5 'shared_files': [ |
6 'type': 'executable', | |
7 'dependencies': [ | |
8 'googletest_main', | |
9 ], | |
10 'sources': [ | |
11 'src/shared/AutoHandle.cpp', | 6 'src/shared/AutoHandle.cpp', |
12 'src/shared/Communication.cpp', | 7 'src/shared/Communication.cpp', |
13 'src/shared/Dictionary.cpp', | 8 'src/shared/Dictionary.cpp', |
14 'src/shared/Utils.cpp', | 9 'src/shared/Utils.cpp', |
| 10 ] |
| 11 }, |
| 12 |
| 13 'target_defaults': { |
| 14 'configurations': { |
| 15 'Debug': { |
| 16 'defines': [ '_DEBUG' ], |
| 17 'msvs_settings': { |
| 18 'VCCLCompilerTool': { |
| 19 'Optimization': '0', |
| 20 |
| 21 'conditions': [ |
| 22 ['component=="shared_library"', { |
| 23 'RuntimeLibrary': '3', # /MDd |
| 24 }, { |
| 25 'RuntimeLibrary': '1', # /MTd |
| 26 }] |
| 27 ], |
| 28 }, |
| 29 }, |
| 30 }, |
| 31 'Release': { |
| 32 'defines': [ 'NDEBUG' ], |
| 33 'msvs_settings': { |
| 34 'VCCLCompilerTool': { |
| 35 'Optimization': '2', |
| 36 'InlineFunctionExpansion': '2', |
| 37 'EnableIntrinsicFunctions': 'true', |
| 38 'FavorSizeOrSpeed': '0', |
| 39 'StringPooling': 'true', |
| 40 'WholeProgramOptimization': 'true', |
| 41 'EnableFunctionLevelLinking': 'true', |
| 42 |
| 43 'conditions': [ |
| 44 ['component=="shared_library"', { |
| 45 'RuntimeLibrary': '2', # /MD |
| 46 }, { |
| 47 'RuntimeLibrary': '0', # /MT |
| 48 }] |
| 49 ], |
| 50 }, |
| 51 'VCLinkerTool': { |
| 52 'EnableCOMDATFolding': 2, # true |
| 53 'OptimizeReferences': 2, # true |
| 54 }, |
| 55 }, |
| 56 }, |
| 57 }, |
| 58 'defines': ['WIN32', '_WINDOWS'], |
| 59 'msvs_configuration_attributes': { |
| 60 'CharacterSet': '1', # Unicode |
| 61 }, |
| 62 'msvs_settings': { |
| 63 'VCCLCompilerTool': { |
| 64 'WarningLevel': 3, # Level3 |
| 65 }, |
| 66 'VCLinkerTool': { |
| 67 'SubSystem': '2', # Windows |
| 68 'GenerateDebugInformation': 'true', |
| 69 }, |
| 70 'VCMIDLTool': { |
| 71 'TypeLibraryName': '$(TargetName).tlb', |
| 72 }, |
| 73 }, |
| 74 'conditions': [ |
| 75 [ |
| 76 'build_type=="devbuild"', |
| 77 { |
| 78 'defines': ['ADBLOCK_PLUS_TEST_MODE', 'ADBLOCKPLUS_TEST_MODE'], |
| 79 }, |
| 80 { |
| 81 'defines': ['ADBLOCK_PLUS_PRODUCTION_MODE', 'ADBLOCKPLUS_PRODUCTION_MO
DE'], |
| 82 }, |
| 83 ], |
| 84 [ |
| 85 'build_version!=""', |
| 86 { |
| 87 'defines': [ |
| 88 'IEPLUGIN_VERSION=L"<(version)"', |
| 89 'VERSIONINFO_VERSION=<!(python -c "import sys; print sys.argv[1].rep
lace(\'.\', \',\')" <(version).0)', |
| 90 'VERSIONINFO_VERSION_STR=\\"<(version).0\\"', |
| 91 ], |
| 92 } |
| 93 ], |
| 94 ], |
| 95 }, |
| 96 |
| 97 'targets': [{ |
| 98 'target_name': 'AdblockPlusEngine', |
| 99 'type': 'executable', |
| 100 'dependencies': [ |
| 101 'libadblockplus/libadblockplus.gyp:libadblockplus', |
| 102 ], |
| 103 'sources': [ |
| 104 'src/engine/main.cpp', |
| 105 'src/engine/Debug.cpp', |
| 106 'src/engine/Updater.cpp', |
| 107 'src/engine/engine.rc', |
| 108 '<@(shared_files)', |
| 109 ], |
| 110 'libraries': [ |
| 111 '-ladvapi32', |
| 112 '-lole32', |
| 113 '-luser32', |
| 114 '-lshell32', |
| 115 '-lshlwapi', |
| 116 ], |
| 117 'msbuild_toolset': 'v110_xp', |
| 118 'msvs_settings': { |
| 119 'VCLinkerTool': { |
| 120 'DelayLoadDLLs': ['Shell32.dll'], |
| 121 }, |
| 122 }, |
| 123 }, { |
| 124 'target_name': 'AdblockPlus', |
| 125 'type': 'shared_library', |
| 126 'sources': [ |
| 127 'src/plugin/AdblockPlusClient.cpp', |
| 128 'src/plugin/AdblockPlusDomTraverser.cpp', |
| 129 'src/plugin/AdblockPlusTab.cpp', |
| 130 'src/plugin/Plugin.cpp', |
| 131 'src/plugin/PluginChecksum.cpp', |
| 132 'src/plugin/PluginClass.cpp', |
| 133 'src/plugin/PluginClassThread.cpp', |
| 134 'src/plugin/PluginClientBase.cpp', |
| 135 'src/plugin/PluginClientFactory.cpp', |
| 136 'src/plugin/PluginConfiguration.cpp', |
| 137 'src/plugin/PluginDebug.cpp', |
| 138 'src/plugin/PluginFilter.cpp', |
| 139 'src/plugin/PluginHttpRequest.cpp', |
| 140 'src/plugin/PluginIniFile.cpp', |
| 141 'src/plugin/PluginIniFileW.cpp', |
| 142 'src/plugin/PluginMimeFilterClient.cpp', |
| 143 'src/plugin/PluginMutex.cpp', |
| 144 'src/plugin/PluginSettings.cpp', |
| 145 'src/plugin/PluginSha1.cpp', |
| 146 'src/plugin/PluginStdAfx.cpp', |
| 147 'src/plugin/PluginSystem.cpp', |
| 148 'src/plugin/PluginTabBase.cpp', |
| 149 'src/plugin/PluginUserSettings.cpp', |
| 150 'src/plugin/PluginUtil.cpp', |
| 151 'src/plugin/PluginWbPassThrough.cpp', |
| 152 'src/plugin/AdblockPlus.def', |
| 153 'src/plugin/AdblockPlus.idl', |
| 154 'src/plugin/AdblockPlus.rc', |
| 155 'src/plugin/AdblockPlus.rgs', |
| 156 '<@(shared_files)', |
| 157 ], |
| 158 'include_dirs': [ |
| 159 '$(WindowsSDK_IncludePath)', |
| 160 '$(VCInstallDir)atlmfc/include', |
| 161 '$(WINDDKDIR)/inc/atl71', |
| 162 ], |
| 163 'defines': ['PRODUCT_ADBLOCKPLUS'], |
| 164 'libraries': [ |
| 165 '-latlthunk', |
| 166 '-lwinhttp', |
| 167 '-lshell32', |
| 168 ], |
| 169 'configurations': { |
| 170 # 'libraries' is not allowed under 'configurations' :-( |
| 171 'Debug': { |
| 172 'msvs_settings': { |
| 173 'VCLinkerTool': { |
| 174 'AdditionalDependencies': ['atlsd.lib'], |
| 175 }, |
| 176 }, |
| 177 }, |
| 178 'Release': { |
| 179 'msvs_settings': { |
| 180 'VCLinkerTool': { |
| 181 'AdditionalDependencies': ['atls.lib'], |
| 182 }, |
| 183 }, |
| 184 }, |
| 185 }, |
| 186 'msvs_settings': { |
| 187 'VCLinkerTool': { |
| 188 'conditions': [[ |
| 189 'target_arch=="ia32"', { |
| 190 'AdditionalLibraryDirectories': [ |
| 191 '$(WindowsSDK_LibraryPath_x86)', |
| 192 '$(WINDDKDIR)/lib/ATL/i386', |
| 193 ], |
| 194 }, { |
| 195 'AdditionalLibraryDirectories': [ |
| 196 '$(WindowsSDK_LibraryPath_x64)', |
| 197 '$(WINDDKDIR)/lib/ATL/amd64', |
| 198 ], |
| 199 } |
| 200 ]], |
| 201 'AdditionalLibraryDirectories': [ |
| 202 '$(VCInstallDir)atlmfc/lib', |
| 203 ], |
| 204 'DelayLoadDLLs': ['Shell32.dll'], |
| 205 }, |
| 206 }, |
| 207 }, { |
| 208 'target_name': 'tests', |
| 209 'type': 'executable', |
| 210 'dependencies': [ |
| 211 'libadblockplus/third_party/googletest.gyp:googletest_main', |
| 212 ], |
| 213 'sources': [ |
| 214 '<@(shared_files)', |
15 'test/CommunicationTest.cpp', | 215 'test/CommunicationTest.cpp', |
16 'test/DictionaryTest.cpp', | 216 'test/DictionaryTest.cpp', |
17 ], | 217 ], |
18 'defines': ['WINVER=0x0501'], | 218 'defines': ['WINVER=0x0501'], |
19 'link_settings': { | 219 'link_settings': { |
20 'libraries': ['-ladvapi32', '-lshell32', '-lole32'], | 220 'libraries': ['-ladvapi32', '-lshell32', '-lole32'], |
21 }, | 221 }, |
22 'msvs_settings': { | 222 'msvs_settings': { |
23 'VCLinkerTool': { | 223 'VCLinkerTool': { |
24 'SubSystem': '1', # Console | 224 'SubSystem': '1', # Console |
25 'EntryPointSymbol': 'mainCRTStartup', | 225 'EntryPointSymbol': 'mainCRTStartup', |
26 }, | 226 }, |
27 }, | 227 }, |
28 }] | 228 }] |
29 } | 229 } |
OLD | NEW |