Merge branch 'mingw64-compat-fixes'

* mingw64-compat-fixes:
  CMakeLists.txt: install libFLAC-8.dll for win32 build
  Improved support for MinGW cross compile builds
This commit is contained in:
Tobias Doerffel
2010-07-26 15:04:00 +02:00
12 changed files with 95 additions and 98 deletions

View File

@@ -92,7 +92,7 @@ add_subdirectory(src/Samples)
ADD_LIBRARY(ZynAddSubFxCore SHARED LocalZynAddSubFx.cpp ${MXML_SRC})
TARGET_LINK_LIBRARIES(ZynAddSubFxCore ${ZASF_CORE_LIBS} ${FFTW3F_LIBRARIES} -lz -lpthread)
IF(LMMS_BUILD_WIN32)
TARGET_LINK_LIBRARIES(ZynAddSubFxCore -lwsock32)
TARGET_LINK_LIBRARIES(ZynAddSubFxCore -lws2_32)
INSTALL(TARGETS ZynAddSubFxCore DESTINATION ${PLUGIN_DIR})
ELSE(LMMS_BUILD_WIN32)
INSTALL(TARGETS ZynAddSubFxCore LIBRARY DESTINATION ${PLUGIN_DIR})
@@ -144,7 +144,7 @@ IF(LMMS_BUILD_WIN64)
ELSEIF(LMMS_BUILD_WIN32)
SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win32Toolchain.cmake")
ENDIF(LMMS_BUILD_WIN64)
ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DUSE_OPENGL:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE=release && ${CMAKE_BUILD_TOOL})
ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules/ -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DUSE_OPENGL:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE=release && ${CMAKE_BUILD_TOOL})
ADD_DEPENDENCIES(RemoteZynAddSubFx libfltk)
ENDIF(LMMS_HAVE_FFTW3F)

View File

@@ -241,7 +241,7 @@ struct FL_EXPORT Fl_Menu_Item {
and casting the long to a void* and may not be
portable to some machines.
*/
long argument() const {return (long)user_data_;}
intptr_t argument() const {return (intptr_t)user_data_;}
/**
For convenience you can also define the callback as taking a long
argument. This is implemented by casting this to a Fl_Callback

View File

@@ -31,6 +31,8 @@
#ifndef Fl_Widget_H
#define Fl_Widget_H
#include <stdint.h>
#include "Enumerations.H"
class Fl_Widget;
@@ -592,7 +594,7 @@ public:
/** Gets the current user data (long) argument that is passed to the callback function.
*/
long argument() const {return (long)user_data_;}
intptr_t argument() const {return (intptr_t)user_data_;}
/** Sets the current user data (long) argument that is passed to the callback function.
\todo The user data value must be implemented using a \em union to avoid

View File

@@ -36,6 +36,7 @@
#include <sys/types.h>
#include "flstring.h"
#ifdef WIN32
#include <stdint.h>
# include <windows.h>
# include <shellapi.h>
#else
@@ -112,7 +113,7 @@ fl_open_uri(const char *uri, char *msg, int msglen) {
#ifdef WIN32
if (msg) snprintf(msg, msglen, "open %s", uri);
return (int)ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW) > 32;
return (intptr_t)ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW) > 32;
#elif defined(__APPLE__)
char *argv[3]; // Command-line arguments