[BROWSEUI] Try to "fix" IEThreadParamBlock structure for x64
[reactos.git] / CMakeLists.txt
index 756b08f..5219393 100644 (file)
@@ -6,17 +6,16 @@ if(NOT CMAKE_VERSION MATCHES "ReactOS")
     message(WARNING "Building with \"${CMAKE_COMMAND}\", which is not the custom CMake included in RosBE, might cause build issues...")
 endif()
 
-# Don't escape preprocessor definition values added via add_definitions
-cmake_policy(SET CMP0005 OLD)
-
-# Honor CMAKE_SHARED_LIBRARY_<Lang>_FLAGS variable.
-cmake_policy(SET CMP0018 OLD)
-
 if(POLICY CMP0058)
     # Ninja requires custom command byproducts to be explicit
     cmake_policy(SET CMP0058 OLD)
 endif()
 
+if(POLICY CMP0065)
+    # Do not add flags to export symbols from executables without the ENABLE_EXPORTS target property
+    cmake_policy(SET CMP0065 NEW)
+endif()
+
 project(REACTOS)
 
 # Versioning
@@ -25,9 +24,11 @@ include(sdk/include/reactos/version.cmake)
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
 set(CMAKE_SHARED_LIBRARY_PREFIX "")
+set(CMAKE_SHARED_MODULE_PREFIX "")
 set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
 set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
 set(CMAKE_COLOR_MAKEFILE OFF)
+set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
 #set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
 
 if(NOT DEFINED NEW_STYLE_BUILD)
@@ -59,8 +60,8 @@ include(sdk/cmake/compilerflags.cmake)
 add_definitions(-D__REACTOS__)
 
 # Double escape, since CMake unescapes before putting it on the command-line, where it's unescaped again by GCC/CL.
-add_definitions(-DREACTOS_SOURCE_DIR="\\\"${REACTOS_SOURCE_DIR}\\\"")
-add_definitions(-DREACTOS_BINARY_DIR="\\\"${REACTOS_BINARY_DIR}\\\"")
+add_definitions(-DREACTOS_SOURCE_DIR="${REACTOS_SOURCE_DIR}")
+add_definitions(-DREACTOS_BINARY_DIR="${REACTOS_BINARY_DIR}")
 
 # There doesn't seem to be a standard for __FILE__ being relative or absolute, so detect it at runtime.
 file(RELATIVE_PATH _PATH_PREFIX ${REACTOS_BINARY_DIR} ${REACTOS_SOURCE_DIR})
@@ -166,7 +167,8 @@ else()
                     -D_WIN32_IE=0x600
                     -D_WIN32_WINNT=0x502
                     -D_WIN32_WINDOWS=0x502
-                    -D_SETUPAPI_VER=0x502)
+                    -D_SETUPAPI_VER=0x502
+                    -DMINGW_HAS_SECURE_API=1)
 
     # Arch Options
     if(ARCH STREQUAL "i386")
@@ -185,6 +187,7 @@ else()
     endif()
 
     # Other
+    add_definitions(-D_NEW_DELETE_OPERATORS_)
     if(ARCH STREQUAL "i386")
         add_definitions(-DUSE_COMPILER_EXCEPTIONS -D_USE_32BIT_TIME_T)
     elseif(ARCH STREQUAL "amd64")