X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2FCMakeLists.txt;h=456c35a8dfbcfe6ac6e790026ccb38179bb07e6f;hb=34a08454016ac677d70c178ba52ef79743af565f;hp=b138fccd7ce6ce38b06e33b1c6204bdc44f83f22;hpb=64d2c52e8213fc903330db87181a52287708791d;p=novacoin.git diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b138fcc..456c35a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,7 +26,10 @@ if(CCACHE_FOUND) endif(CCACHE_FOUND) if (NOT MSVC) -set (CMAKE_C_FLAGS "-flto -O3 -fPIC -Wno-deprecated -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2") +if (NOT WIN32) +set(FPIC "-fPIC") +endif() +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") @@ -113,7 +116,8 @@ list(APPEND ALL_LIBRARIES ${Boost_LIBRARIES} ixwebsocket OpenSSL::Crypto) # Windows-specific libraries if (WIN32) - list(APPEND ALL_LIBRARIES kernel32 user32 gdi32 comdlg32 winspool winmm shell32 comctl32 ole32 oleaut32 uuid rpcrt4 advapi32 ws2_32 mswsock shlwapi) + list(APPEND ALL_LIBRARIES kernel32 user32 gdi32 comdlg32 winspool winmm shell32 comctl32 ole32 oleaut32 uuid rpcrt4 advapi32 ws2_32 mswsock shlwapi) + list(APPEND ALL_DEFINITIONS WIN32) endif() # Some systems need rt library