Permalink
Browse files

Merge pull request #1204 from R1dO/cmake-opengl_and_travis_fixes

Cmake (opengl) and travis fixes
  • Loading branch information...
SupSuper committed Oct 29, 2018
2 parents dc3bc01 + 31e3863 commit 97f4646cee24231f4e7d5801c94bbd318af50d9d
Showing with 5 additions and 3 deletions.
  1. +0 −1 .travis.yml
  2. +4 −1 CMakeLists.txt
  3. +1 −1 src/CMakeLists.txt
@@ -13,7 +13,6 @@ sudo: false
addons:
apt:
packages:
- cmake
- libsdl1.2-dev
- libsdl-mixer1.2-dev
- libsdl-image1.2-dev
@@ -1,6 +1,7 @@
cmake_minimum_required ( VERSION 3.1 )
project ( OpenXcom )
cmake_minimum_required ( VERSION 3.1 )
set ( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include(GNUInstallDirs)
@@ -98,6 +99,7 @@ else ( )
endif()
# Find OpenGL
set (OpenGL_GL_PREFERENCE LEGACY)
find_package ( OpenGL )
if ( NOT OPENGL_FOUND )
message ( WARNING "Can't find OpenGL; how does that even happen?\n"
@@ -106,6 +108,7 @@ if ( NOT OPENGL_FOUND )
add_definitions(-D__NO_OPENGL)
else ()
include_directories ( ${OPENGL_INCLUDE_DIR} )
message ( "found openGL (${OPENGL_LIBRARIES})" )
endif ()
# Read version number
@@ -484,7 +484,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD OR ${CMAKE_SYSTEM_NAME} MATCHES NetBSD
set ( system_libs -lexecinfo )
endif ()
target_link_libraries ( openxcom ${system_libs} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLGFX_LIBRARY} ${SDL_LIBRARY} ${OPENGL_gl_LIBRARY} debug ${YAMLCPP_LIBRARY_DEBUG} optimized ${YAMLCPP_LIBRARY} )
target_link_libraries ( openxcom ${system_libs} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLGFX_LIBRARY} ${SDL_LIBRARY} OpenGL::GL debug ${YAMLCPP_LIBRARY_DEBUG} optimized ${YAMLCPP_LIBRARY} )
# Pack libraries into bundle and link executable appropriately
if ( APPLE AND CREATE_BUNDLE )

0 comments on commit 97f4646

Please sign in to comment.