Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[win+java] we need to need CMAKE_SHARED_LIBRARY_LINK_C_FLAGS too
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 5 Oct 2015 22:43:09 +0000 (00:43 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 5 Oct 2015 22:43:09 +0000 (00:43 +0200)
tools/cmake/GCCFlags.cmake

index 76e5322..11d5caf 100644 (file)
@@ -173,12 +173,16 @@ if(MINGW)
   #¬†We don't want to ship libgcc_s_seh-1.dll nor libstdc++-6.dll
   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -static-libgcc")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
+  set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS   "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc")
+  set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++")
   
   # JNI searches for stdcalls
   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -Wl,--add-stdcall-alias")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--add-stdcall-alias")
+  set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -Wl,--add-stdcall-alias")
+  set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -Wl,--add-stdcall-alias")
   
-  # Specify the data model that we are using (yeah it helps. eg Java)
+  # Specify the data model that we are using (yeah it may help Java)
   if(ARCH_32_BITS) 
     set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -m32")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")