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 }, |
| 71 'conditions': [ |
| 72 [ |
| 73 'build_type=="devbuild"', |
| 74 { |
| 75 'defines': ['ADBLOCK_PLUS_TEST_MODE', 'ADBLOCKPLUS_TEST_MODE'], |
| 76 }, |
| 77 { |
| 78 'defines': ['ADBLOCK_PLUS_PRODUCTION_MODE', 'ADBLOCKPLUS_PRODUCTION_MO
DE'], |
| 79 }, |
| 80 ], |
| 81 [ |
| 82 'build_version!=""', |
| 83 { |
| 84 'defines': [ |
| 85 'IEPLUGIN_VERSION=L"<(version)"', |
| 86 'VERSIONINFO_VERSION=<!(python -c "import sys; print sys.argv[1].rep
lace(\'.\', \',\')" <(version).0)', |
| 87 'VERSIONINFO_VERSION_STR=\\"<(version).0\\"', |
| 88 ], |
| 89 } |
| 90 ], |
| 91 ], |
| 92 }, |
| 93 |
| 94 'targets': [{ |
| 95 'target_name': 'AdblockPlusEngine', |
| 96 'type': 'executable', |
| 97 'dependencies': [ |
| 98 'libadblockplus/libadblockplus.gyp:libadblockplus', |
| 99 ], |
| 100 'sources': [ |
| 101 'src/engine/main.cpp', |
| 102 'src/engine/Debug.cpp', |
| 103 'src/engine/Updater.cpp', |
| 104 'src/engine/engine.rc', |
| 105 '<@(shared_files)', |
| 106 ], |
| 107 'libraries': [ |
| 108 '-ladvapi32', |
| 109 '-lole32', |
| 110 '-luser32', |
| 111 '-lshell32', |
| 112 '-lshlwapi', |
| 113 ], |
| 114 'msbuild_toolset': 'v110_xp', |
| 115 'msvs_settings': { |
| 116 'VCLinkerTool': { |
| 117 'DelayLoadDLLs': ['Shell32.dll'], |
| 118 }, |
| 119 }, |
| 120 }, { |
| 121 'target_name': 'AdblockPlus', |
| 122 'type': 'shared_library', |
| 123 'sources': [ |
| 124 'src/plugin/AdblockPlusClient.cpp', |
| 125 'src/plugin/AdblockPlusDomTraverser.cpp', |
| 126 'src/plugin/AdblockPlusTab.cpp', |
| 127 'src/plugin/Plugin.cpp', |
| 128 'src/plugin/PluginChecksum.cpp', |
| 129 'src/plugin/PluginClass.cpp', |
| 130 'src/plugin/PluginClassThread.cpp', |
| 131 'src/plugin/PluginClientBase.cpp', |
| 132 'src/plugin/PluginClientFactory.cpp', |
| 133 'src/plugin/PluginConfiguration.cpp', |
| 134 'src/plugin/PluginDebug.cpp', |
| 135 'src/plugin/PluginFilter.cpp', |
| 136 'src/plugin/PluginHttpRequest.cpp', |
| 137 'src/plugin/PluginIniFile.cpp', |
| 138 'src/plugin/PluginIniFileW.cpp', |
| 139 'src/plugin/PluginMimeFilterClient.cpp', |
| 140 'src/plugin/PluginMutex.cpp', |
| 141 'src/plugin/PluginSettings.cpp', |
| 142 'src/plugin/PluginSha1.cpp', |
| 143 'src/plugin/PluginStdAfx.cpp', |
| 144 'src/plugin/PluginSystem.cpp', |
| 145 'src/plugin/PluginTabBase.cpp', |
| 146 'src/plugin/PluginUserSettings.cpp', |
| 147 'src/plugin/PluginUtil.cpp', |
| 148 'src/plugin/PluginWbPassThrough.cpp', |
| 149 'src/plugin/AdblockPlus.def', |
| 150 'src/plugin/AdblockPlus.idl', |
| 151 'src/plugin/AdblockPlus.rc', |
| 152 'src/plugin/AdblockPlus.rgs', |
| 153 '<@(shared_files)', |
| 154 ], |
| 155 'include_dirs': [ |
| 156 '$(WindowsSDK_IncludePath)', |
| 157 '$(VCInstallDir)atlmfc/include', |
| 158 '$(WINDDKDIR)/inc/atl71', |
| 159 ], |
| 160 'library_dirs': [ |
| 161 '$(VCInstallDir)atlmfc/lib', |
| 162 ], |
| 163 'defines': ['PRODUCT_ADBLOCKPLUS'], |
| 164 'conditions': [ |
| 165 [ |
| 166 'target_arch=="ia32"', { |
| 167 'library_dirs': [ |
| 168 '$(WindowsSDK_LibraryPath_x86)', |
| 169 '$(WINDDKDIR)/lib/ATL/i386', |
| 170 ], |
| 171 }, { |
| 172 'library_dirs': [ |
| 173 '$(WindowsSDK_LibraryPath_x64)', |
| 174 '$(WINDDKDIR)/lib/ATL/amd64', |
| 175 ], |
| 176 } |
| 177 ] |
| 178 ], |
| 179 'libraries': [ |
| 180 '-latlthunk', |
| 181 '-lshell32', |
| 182 ], |
| 183 'msvs_settings': { |
| 184 'VCLinkerTool': { |
| 185 'DelayLoadDLLs': ['Shell32.dll'], |
| 186 }, |
| 187 }, |
| 188 }, { |
| 189 'target_name': 'tests', |
| 190 'type': 'executable', |
| 191 'dependencies': [ |
| 192 'libadblockplus/third_party/googletest.gyp:googletest_main', |
| 193 ], |
| 194 'sources': [ |
| 195 '<@(shared_files)', |
15 'test/CommunicationTest.cpp', | 196 'test/CommunicationTest.cpp', |
16 'test/DictionaryTest.cpp', | 197 'test/DictionaryTest.cpp', |
17 ], | 198 ], |
18 'defines': ['WINVER=0x0501'], | 199 'defines': ['WINVER=0x0501'], |
19 'link_settings': { | 200 'link_settings': { |
20 'libraries': ['-ladvapi32', '-lshell32', '-lole32'], | 201 'libraries': ['-ladvapi32', '-lshell32', '-lole32'], |
21 }, | 202 }, |
22 'msvs_settings': { | 203 'msvs_settings': { |
23 'VCLinkerTool': { | 204 'VCLinkerTool': { |
24 'SubSystem': '1', # Console | 205 'SubSystem': '1', # Console |
25 'EntryPointSymbol': 'mainCRTStartup', | 206 'EntryPointSymbol': 'mainCRTStartup', |
26 }, | 207 }, |
27 }, | 208 }, |
28 }] | 209 }] |
29 } | 210 } |
OLD | NEW |