Fix exe linker flags
authoruser <balthazar@yandex.ru>
Sun, 26 Dec 2021 04:55:43 +0000 (07:55 +0300)
committeruser <balthazar@yandex.ru>
Sun, 26 Dec 2021 04:55:43 +0000 (07:55 +0300)
CMakeLists.txt
src/CMakeLists.txt

index 2e2df11..108de95 100644 (file)
@@ -257,14 +257,14 @@ execute_process (
 )
 list(APPEND ALL_DEFINITIONS HAVE_BUILD_INFO)
 
-add_executable(novacoin-qt ${ALL_SOURCES})
+add_executable(novacoin-qt WIN32 ${ALL_SOURCES})
 
 if (NOT MSVC)
 list(APPEND ALL_LIBRARIES ssp)
 list(APPEND ALL_DEFINITIONS _FORTIFY_SOURCE=2)
 if (WIN32)
 list(APPEND ALL_LIBRARIES mingw32)
-set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static")
 endif()
 endif()
 
index 8a0803a..f32828c 100644 (file)
@@ -173,7 +173,7 @@ list(APPEND ALL_LIBRARIES ssp)
 list(APPEND ALL_DEFINITIONS _FORTIFY_SOURCE=2)
 if (WIN32)
 list(APPEND ALL_LIBRARIES mingw32)
-set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static")
 endif()
 endif()