OLD | NEW |
1 # Minimum CMake required | 1 # Minimum CMake required |
2 cmake_minimum_required(VERSION 2.8) | 2 cmake_minimum_required(VERSION 2.8) |
3 | 3 |
4 # Project | 4 # Project |
5 project(protobuf C CXX) | 5 project(protobuf C CXX) |
6 | 6 |
7 # CMake policies | 7 # CMake policies |
8 cmake_policy(SET CMP0022 NEW) | 8 cmake_policy(SET CMP0022 NEW) |
9 | 9 |
10 # Options | 10 # Options |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") | 111 string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") |
112 endif(${flag_var} MATCHES "/MD") | 112 endif(${flag_var} MATCHES "/MD") |
113 endforeach(flag_var) | 113 endforeach(flag_var) |
114 endif (MSVC AND protobuf_MSVC_STATIC_RUNTIME) | 114 endif (MSVC AND protobuf_MSVC_STATIC_RUNTIME) |
115 endif (protobuf_BUILD_SHARED_LIBS) | 115 endif (protobuf_BUILD_SHARED_LIBS) |
116 | 116 |
117 if (MSVC) | 117 if (MSVC) |
118 # Build with multiple processes | 118 # Build with multiple processes |
119 add_definitions(/MP) | 119 add_definitions(/MP) |
120 add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd414
6 /wd4305) | 120 add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd414
6 /wd4305) |
| 121 # Allow big object |
| 122 add_definitions(/bigobj) |
121 string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) | 123 string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) |
122 string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR}) | 124 string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR}) |
123 configure_file(extract_includes.bat.in extract_includes.bat) | 125 configure_file(extract_includes.bat.in extract_includes.bat) |
124 endif (MSVC) | 126 endif (MSVC) |
125 | 127 |
126 get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) | 128 get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) |
127 | 129 |
128 include_directories( | 130 include_directories( |
129 ${ZLIB_INCLUDE_DIRECTORIES} | 131 ${ZLIB_INCLUDE_DIRECTORIES} |
130 ${protobuf_BINARY_DIR} | 132 ${protobuf_BINARY_DIR} |
(...skipping 11 matching lines...) Expand all Loading... |
142 include(libprotobuf-lite.cmake) | 144 include(libprotobuf-lite.cmake) |
143 include(libprotobuf.cmake) | 145 include(libprotobuf.cmake) |
144 include(libprotoc.cmake) | 146 include(libprotoc.cmake) |
145 include(protoc.cmake) | 147 include(protoc.cmake) |
146 | 148 |
147 if (protobuf_BUILD_TESTS) | 149 if (protobuf_BUILD_TESTS) |
148 include(tests.cmake) | 150 include(tests.cmake) |
149 endif (protobuf_BUILD_TESTS) | 151 endif (protobuf_BUILD_TESTS) |
150 | 152 |
151 include(install.cmake) | 153 include(install.cmake) |
OLD | NEW |