- ./mingw32-build
tags:
- shared
+
+build_mingw64:
+ stage: build
+ script:
+ - dnf --quiet --assumeyes install mingw64-gcc mingw64-gcc-c++ mingw64-binutils
+ - export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig"
+ - export PATH=/usr/x86_64-w64-mingw32/bin:$PATH
+ - mkdir -p x86_64-w64-mingw32 mingw64-build; cd x86_64-w64-mingw32
+ - cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake -DLUGARU_INSTALL_PREFIX=/builds/osslugaru/lugaru/mingw64-build -DLUGARU_FORCE_INTERNAL_SDL=True -DLUGARU_FORCE_INTERNAL_GLU=True -DLUGARU_FORCE_INTERNAL_JPEG=True -DLUGARU_FORCE_INTERNAL_PNG=True -DLUGARU_FORCE_INTERNAL_VORBIS=True -DLUGARU_FORCE_INTERNAL_ZLIB=True -DLUGARU_FORCE_INTERNAL_OPENAL=True
+ - make -j4; make install
+ artifacts:
+ expire_in: 7d
+ paths:
+ - ./mingw64-build
+ tags:
+ - shared
project(lugaru)
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.5)
set(SRCDIR "${CMAKE_CURRENT_SOURCE_DIR}/Source")
set(DEPDIR "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies")
endif(MSVC)
if(WIN32)
- if(CMAKE_CROSSCOMPILING)
- ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- COMMAND i686-w64-mingw32-windres
- -I${SRCDIR}/win-res
- -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- -i${SRCDIR}/win-res/Lugaru.rc
- DEPENDS ${SRCDIR}/win-res/Lugaru.rc
- )
- endif(CMAKE_CROSSCOMPILING)
- if(NOT CMAKE_CROSSCOMPILING)
- if(MSVC)
- ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- COMMAND rc
- -I${SRCDIR}/win-res
- -fo${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- ${SRCDIR}/win-res/Lugaru.rc
- DEPENDS ${SRCDIR}/win-res/Lugaru.rc
- )
- endif(MSVC)
- if(MINGW)
- ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- COMMAND windres
- -I${SRCDIR}/win-res
- -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
- -i${SRCDIR}/win-res/Lugaru.rc
- DEPENDS ${SRCDIR}/win-res/Lugaru.rc
- )
- endif(MINGW)
- endif(NOT CMAKE_CROSSCOMPILING)
-
- # !!! FIXME: get rid of this.
+ ENABLE_LANGUAGE(RC)
+
+ # !!! FIXME: get rid of WinDefs.{cpp,h}
set(LUGARU_SRCS
${LUGARU_SRCS}
- ${SRCDIR}/WinDefs.cpp)
+ ${SRCDIR}/WinDefs.cpp
+ ${SRCDIR}/win-res/Lugaru.rc)
set(LUGARU_H
${LUGARU_H}
set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${OPENGL_glu_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY} ${PLATFORM_LIBS})
-if(WIN32)
- add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H} lugaru_resource.obj)
-else(WIN32)
- add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H})
-endif(WIN32)
+add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H})
target_link_libraries(lugaru ${LUGARU_LIBS})