Add qtdeclarative
[novacoin.git] / CMakeLists.txt
index ea528b4..3bdca90 100644 (file)
@@ -25,9 +25,11 @@ endif()
 
 find_program(CCACHE_FOUND ccache)
 if(CCACHE_FOUND)
-    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
     set(CMAKE_C_COMPILER_LAUNCHER ccache)
     set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
+    if (APPLE)
+    set(CMAKE_OBJCXX_COMPILER_LAUNCHER ccache)
+    endif()
 endif(CCACHE_FOUND)
 
 set(CMAKE_AUTOMOC ON)
@@ -37,8 +39,13 @@ set(CMAKE_CXX_EXTENSIONS OFF)
 
 find_package(Qt5 COMPONENTS LinguistTools Core Widgets Gui Network Qml REQUIRED)
 
+if (NOT MSVC)
 set (CMAKE_C_FLAGS "-flto -O3 -fPIC -Wno-deprecated -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2")
 set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -fexceptions -frtti")
+else()
+set(CMAKE_C_FLAGS "/O2")
+set(CMAKE_CXX_FLAGS "/O2 /GR /EHsc")
+endif()
 
 set(Boost_USE_STATIC_LIBS   ON)
 find_package(Boost REQUIRED COMPONENTS atomic chrono filesystem program_options system thread)