]> git.jsancho.org Git - lugaru.git/commitdiff
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly...
authorNeal Gompa <ngompa13@gmail.com>
Thu, 13 May 2010 22:03:23 +0000 (17:03 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Thu, 13 May 2010 22:03:23 +0000 (17:03 -0500)
CMakeLists.txt
Dependencies/SDL12/lib/win32/mingw32/SDL.dll [new file with mode: 0755]
Dependencies/SDL12/lib/win32/mingw32/libSDL.dll.a [new file with mode: 0755]
Dependencies/SDL12/lib/win32/mingw32/libSDL.la [new file with mode: 0755]
Dependencies/SDL12/lib/win32/mingw32/libSDLmain.a [new file with mode: 0644]
Dependencies/SDL12/lib/win32/msvc/SDL.dll [new file with mode: 0755]
Dependencies/SDL12/lib/win32/msvc/SDL.lib [new file with mode: 0755]
Dependencies/SDL12/lib/win32/msvc/SDLmain.lib [new file with mode: 0755]

index caf1f245993bf3476d73e3466486b3619f4fc53f..360148bdc0309d71cca6d795752c0632858630f2 100644 (file)
@@ -106,19 +106,19 @@ if(WIN32)
   if(CMAKE_CROSSCOMPILING)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND i686-pc-mingw32-windres
-                                                         -I${CMAKE_CURRENT_SOURCE_DIR}/res
+                                                         -I${SRCDIR}/res
                                                          -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
-                                                         -i${CMAKE_CURRENT_SOURCE_DIR}/res/lugaru.rc
-                                             DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/lugaru.rc
+                                                         -i${SRCDIR}/res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
                                                  )
   endif(CMAKE_CROSSCOMPILING)
   if(NOT CMAKE_CROSSCOMPILING)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND windres
-                                                         -I${CMAKE_CURRENT_SOURCE_DIR}/res
+                                                         -I${SRCDIR}/res
                                                          -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
-                                                         -i${CMAKE_CURRENT_SOURCE_DIR}/res/lugaru.rc
-                                             DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/lugaru.rc
+                                                         -i${SRCDIR}/res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
                                                  )
   endif(NOT CMAKE_CROSSCOMPILING)
 
@@ -167,10 +167,18 @@ if (NOT SDL_FOUND)
 
     if (WINDOWS)
         set(LUGARU_HAS_INTERNAL_SDL True)
-        set(SDL_LIBRARY
-            ${SDLDIR}/lib/win32/SDL.lib
-            ${SDLDIR}/lib/win32/SDLmain.lib
-        )
+        if (MSVC)
+          set(SDL_LIBRARY
+              ${SDLDIR}/lib/win32/msvc/SDL.lib
+              ${SDLDIR}/lib/win32/msvc/SDLmain.lib
+          )
+        endif (MSVC)
+        if (MINGW)
+          set(SDL_LIBRARY
+              ${SDLDIR}/lib/win32/mingw/libSDL.dll.a
+              ${SDLDIR}/lib/win32/mingw/libSDLmain.a
+          )
+        endif (MINGW)
     endif (WINDOWS)
 
     if (NOT LUGARU_HAS_INTERNAL_SDL)
@@ -394,6 +402,12 @@ endif(WIN32)
 # Install target
 if(WIN32)
        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX})
+       if(MSVC)
+               install(FILES ${SDLDIR}/lib/win32/msvc/SDL.dll DESTINATION ${CMAKE_INSTALL_PREFIX})
+       endif(MSVC)
+       if(MINGW)
+               install(FILES ${SDLDIR}/lib/win32/mingw/SDL.dll DESTINATION ${CMAKE_INSTALL_PREFIX})
+       endif(MINGW)
 else(WIN32)
        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
 endif(WIN32)
diff --git a/Dependencies/SDL12/lib/win32/mingw32/SDL.dll b/Dependencies/SDL12/lib/win32/mingw32/SDL.dll
new file mode 100755 (executable)
index 0000000..49f8aa0
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/mingw32/SDL.dll differ
diff --git a/Dependencies/SDL12/lib/win32/mingw32/libSDL.dll.a b/Dependencies/SDL12/lib/win32/mingw32/libSDL.dll.a
new file mode 100755 (executable)
index 0000000..64772b0
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/mingw32/libSDL.dll.a differ
diff --git a/Dependencies/SDL12/lib/win32/mingw32/libSDL.la b/Dependencies/SDL12/lib/win32/mingw32/libSDL.la
new file mode 100755 (executable)
index 0000000..4f0519f
--- /dev/null
@@ -0,0 +1,41 @@
+# libSDL.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='../bin/SDL.dll'
+
+# Names of this library.
+library_names='libSDL.dll.a'
+
+# The name of the static archive.
+old_library='libSDL.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libSDL.
+current=11
+age=11
+revision=3
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/Dependencies/SDL12/lib/win32/mingw32/libSDLmain.a b/Dependencies/SDL12/lib/win32/mingw32/libSDLmain.a
new file mode 100644 (file)
index 0000000..068941a
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/mingw32/libSDLmain.a differ
diff --git a/Dependencies/SDL12/lib/win32/msvc/SDL.dll b/Dependencies/SDL12/lib/win32/msvc/SDL.dll
new file mode 100755 (executable)
index 0000000..628cdfc
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/msvc/SDL.dll differ
diff --git a/Dependencies/SDL12/lib/win32/msvc/SDL.lib b/Dependencies/SDL12/lib/win32/msvc/SDL.lib
new file mode 100755 (executable)
index 0000000..5b3f17c
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/msvc/SDL.lib differ
diff --git a/Dependencies/SDL12/lib/win32/msvc/SDLmain.lib b/Dependencies/SDL12/lib/win32/msvc/SDLmain.lib
new file mode 100755 (executable)
index 0000000..945b9ad
Binary files /dev/null and b/Dependencies/SDL12/lib/win32/msvc/SDLmain.lib differ