[AD] Windows fixes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I have attached a patch that allows Allegro to be compiled on Windows
with MinGW and cmake. Here is an explanation of what I've changed and why:

I removed the event type parameter from src/win/wkeybdnu.c. I guess the
format of the function has changed.

I removed src/c/cmiscs.s from the Windows compilation. The file is meant
for DOS only.

I added the "binary directory" to the include path in CMakeLists.txt. It
is needed to find asmcapa.h.


Index: src/win/wkeybdnu.c
===================================================================
--- src/win/wkeybdnu.c	(revision 7890)
+++ src/win/wkeybdnu.c	(working copy)
@@ -797,7 +797,7 @@
    }
 
    /* Generate key release events if necessary. */
-   if (!_al_event_source_needs_to_generate_event(&the_keyboard.es, AL_EVENT_KEY_UP))
+   if (!_al_event_source_needs_to_generate_event(&the_keyboard.es))
       return;
 
    event = _al_event_source_get_unused_event(&the_keyboard.es);
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 7890)
+++ CMakeLists.txt	(working copy)
@@ -543,13 +543,13 @@
     list(APPEND LIBRARY_SOURCES ${ALLEGRO_SRC_I386_FILES})
 else(SUPPORT_ASM)
     list(APPEND LIBRARY_SOURCES ${ALLEGRO_SRC_C_FILES})
-    if(WIN32)
-        list(APPEND LIBRARY_SOURCES src/c/cmiscs.s)
-    endif(WIN32)
 endif(SUPPORT_ASM)
 
     # Assembly code and Windows port both require generated asmdef.inc.
     #
+
+INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
+
 add_executable(asmdef src/i386/asmdef.c)
 set_target_properties(asmdef PROPERTIES
     OUTPUT_NAME ${ALLEGRO_LIB_PATH}/asmdef


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/