diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-21 02:18:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 13:24:48 (GMT) |
commit | 83491ddd43fb4733940c92e9d7d7647f66f49bbe (patch) | |
tree | 8f7ef01b2cd622e90b4d6824b3bb0b4a609781bd | |
parent | 1bcacccce9e60800ea826c7e79012a64fec4e687 (diff) | |
download | CMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.zip CMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.tar.gz CMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.tar.bz2 |
Build: `add_definitions()` → `add_compile_definitions()`
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | CompileFlags.cmake | 4 | ||||
-rw-r--r-- | Source/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 54ff7e2..a50e222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -595,7 +595,7 @@ macro(CMAKE_BUILD_UTILITIES) set(EXPAT_LIBRARY ${CMAKE_EXPAT_LIBRARIES}) set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES}) set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES}) - add_definitions(-DLIBARCHIVE_STATIC) + add_compile_definitions(LIBARCHIVE_STATIC) set(ENABLE_MBEDTLS OFF) set(ENABLE_NETTLE OFF) if(DEFINED CMAKE_USE_OPENSSL) diff --git a/CompileFlags.cmake b/CompileFlags.cmake index acfa29f..bf8a082 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -18,7 +18,7 @@ endif() # not hurt other versions, and this will work into the # future if(MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE) else() endif() @@ -62,7 +62,7 @@ endif() # Use 64-bit off_t on 32-bit Linux if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 4) # ensure 64bit offsets are used for filesystem accesses for 32bit compilation - add_definitions(-D_FILE_OFFSET_BITS=64) + add_compile_definitions(_FILE_OFFSET_BITS=64) endif() # Workaround for TOC Overflow on ppc64 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 1182483..2645b7b 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -48,10 +48,10 @@ set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) if(WIN32) # ensure Unicode friendly APIs are used on Windows - add_definitions(-DUNICODE -D_UNICODE) + add_compile_definitions(UNICODE _UNICODE) # minimize windows.h content - add_definitions(-DWIN32_LEAN_AND_MEAN) + add_compile_definitions(WIN32_LEAN_AND_MEAN) endif() # configure the .dox.in file diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 4f56919..f3859e1 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -42,7 +42,7 @@ set(CMake_QT_EXTRA_LIBRARIES) if(WIN32) find_package(Qt${INSTALLED_QT_VERSION}WinExtras QUIET) if(Qt${INSTALLED_QT_VERSION}WinExtras_FOUND) - add_definitions(-DQT_WINEXTRAS) + add_compile_definitions(QT_WINEXTRAS) list(APPEND CMake_QT_EXTRA_LIBRARIES Qt${INSTALLED_QT_VERSION}::WinExtras) list(APPEND QT_COMPONENTS WinExtras) endif() |