From 4d3bd03f16eeffe5f53b18cdc8547978be526242 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Tue, 2 Mar 2010 22:02:43 +0000 Subject: [PATCH] More windows fixes --- CMakeLists.txt | 7 +++++++ src/CMakeLists.txt | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cc05f1ef..809aed459 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,13 @@ include_directories(${LASTFM_INCLUDE_DIRS}) # and don't exist on my mingw toolchain list(REMOVE_ITEM QT_LIBRARIES "-lGLU -lGL") +if (WIN32) + # RC compiler + string(REPLACE "gcc" "windres" CMAKE_RC_COMPILER_INIT ${CMAKE_C_COMPILER}) + ENABLE_LANGUAGE(RC) + SET(CMAKE_RC_COMPILE_OBJECT " -O coff -o ") +endif(WIN32) + # Subdirectories add_subdirectory(3rdparty/qtsingleapplication) add_subdirectory(3rdparty/qxt) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 949127df9..6cc7db003 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -168,6 +168,11 @@ else(APPLE) endif(WIN32) endif(APPLE) +# resource file for windows +if(WIN32) + set(CLEMENTINE-WIN32-RESOURCES ../dist/windres.rc) +endif(WIN32) + qt4_wrap_cpp(CLEMENTINE-SOURCES-MOC ${CLEMENTINE-MOC-HEADERS}) qt4_wrap_ui(CLEMENTINE-SOURCES-UI ${CLEMENTINE-UI}) qt4_add_resources(CLEMENTINE-SOURCES-RESOURCE ${CLEMENTINE-RESOURCES} ${CLEMENTINE-QM-RESOURCE}) @@ -205,6 +210,8 @@ add_dependencies(clementine_lib qtsingleapplication qxt) add_executable(clementine MACOSX_BUNDLE + WIN32 + ${CLEMENTINE-WIN32-RESOURCES} main.cpp ) target_link_libraries(clementine clementine_lib)