void-packages/srcpkgs/lmms/patches/cross.patch

29 lines
1.1 KiB
Diff

--- a/CMakeLists.txt 2017-12-19 18:24:15.000000000 +0100
+++ b/CMakeLists.txt 2017-12-19 18:24:15.000000000 +0100
@@ -498,12 +498,12 @@
LIST(SORT LMMS_INCLUDES)
# embedded resources stuff
-IF(WIN32 OR WIN64)
+IF(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
# compile buildtools native
SET(BIN2RES_CPP "${CMAKE_SOURCE_DIR}/buildtools/bin2res.cpp")
SET(BIN2RES "${CMAKE_BINARY_DIR}/bin2res")
ADD_CUSTOM_TARGET(bin2res COMMAND g++ "\"${BIN2RES_CPP}\"" -o "\"${BIN2RES}\"" DEPENDS "${BIN2RES_CPP}")
-ELSE(WIN32 OR WIN64)
+ELSE(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(bin2res buildtools/bin2res.cpp)
GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION)
ENDIF(WIN32 OR WIN64)
--- a/CMakeLists.txt 2018-03-26 13:35:11.477353707 +0200
+++ b/CMakeLists.txt 2018-03-26 13:35:11.477353707 +0200
@@ -506,7 +506,7 @@
ELSE(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(bin2res buildtools/bin2res.cpp)
GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION)
-ENDIF(WIN32 OR WIN64)
+ENDIF(WIN32 OR WIN64 OR CMAKE_CROSSCOMPILING)
# we somehow have to make LMMS-binary depend on MOC-files
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")