From c09d24ff0a0678f46c595c396afc204bd9f19942 Mon Sep 17 00:00:00 2001 From: Marty Plummer Date: Thu, 25 May 2017 04:17:02 -0500 Subject: [PATCH] Allows cross-compilation to windows targets. Tested on gentoo with x86_64-w64-mingw32 toolchain and libraries. Signed-off-by: Marty Plummer --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d875826..7029f79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,7 @@ find_package(ZLIB REQUIRED) ## Setup main source ## set(MAIN_HEADERS + assets/resource.h src/quadarray.h src/audio.h src/binding.h @@ -205,6 +206,10 @@ set(MAIN_SOURCE src/fluid-fun.cpp ) +if(WIN32) + list(APPEND MAIN_SOURCE assets/resource.rc) +endif() + source_group("MKXP Source" FILES ${MAIN_SOURCE} ${MAIN_HEADERS}) ## Setup embedded source ## @@ -404,6 +409,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES} ) target_include_directories(${PROJECT_NAME} PRIVATE + assets src ${SIGCXX_INCLUDE_DIRS} ${PIXMAN_INCLUDE_DIRS}