Commit 4b2a910b authored by Gerhard Stein's avatar Gerhard Stein

SDL Find fixes on windows

parent d0cc9ef8
......@@ -9,6 +9,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
# Use compile time reducer
include(cotire)
include(FindSDL2_mixer)
option(USE_PYTHON3 "Use Python3 scripts" yes)
......
......@@ -66,9 +66,7 @@ IF(CREATE_DEBS)
ELSEIF(BUILD_ARCH STREQUAL i386)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
ENDIF(BUILD_ARCH STREQUAL amd64)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libvorbis0a (>= 1.2.3), libvorbisenc2 (>> 1.2.3), libvorbisfile3 (>= 1.2.3), libsdl2-2.0-0 (>= 2.0.0), libgl1-mesa-glx (>= 7.7.1), libsdl2-image-2.0-0 (>= 2.0), libpython3.5 (>= 3.5.2)")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libvorbis0a (>= 1.2.3), libvorbisenc2 (>> 1.2.3), libvorbisfile3 (>= 1.2.3), libsdl2-2.0-0 (>= 2.0.0), libgl1-mesa-glx (>= 7.7.1), libsdl2-image-2.0-0 (>= 2.0), libsdl2-mixer-2.0-0 (>= 2.0), libpython3.5 (>= 3.5.2)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
ENDIF(WIN32)
......
......@@ -59,7 +59,7 @@ ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/GsKit)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/)
#set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMake)
......@@ -234,7 +234,7 @@ target_link_libraries( CGeniusExe ${ZLIB_LIBRARIES} )
if(USE_SDL2)
message(STATUS "SDL2_LIBRARY = ${SDL2_LIBRARY}")
message(STATUS "SDL2_LIBRARY = ${SDL2_LIBRARY}")
message(STATUS "SDL2IMAGE_LIBRARY = ${SDL2IMAGE_LIBRARY}")
else(USE_SDL2)
# SDL stuff to link
......@@ -268,7 +268,7 @@ if(WIN32)
target_link_libraries(CGeniusExe mingw32)
target_link_libraries(CGeniusExe user32)
target_link_libraries(CGeniusExe gdi32)
target_link_libraries(CGeniusExe SDL2Main SDL2)
target_link_libraries(CGeniusExe SDL2Main SDL2)
target_link_libraries(CGeniusExe SDL2_image)
target_link_libraries(CGeniusExe winmm)
target_link_libraries(CGeniusExe Imm32)
......
......@@ -6,3 +6,10 @@ FILE(GLOB_RECURSE srcs *.cpp *.h)
add_library(engine_core ${srcs})
target_link_libraries(engine_core sdl_extensions_audio sdl_extensions_sys)
target_link_libraries(engine_core sdl_extensions_audio sdl_extensions_sys)
# TODO: Not sure why Windows requires this yet.
if(WIN32)
Target_link_libraries(engine_core SDL2)
endif(WIN32)
......@@ -7,5 +7,5 @@ add_subdirectory(dreams)
add_library(engine_keen KeenEngine.cpp KeenEngine.h)
target_link_libraries(engine_keen
target_link_libraries(engine_keen
fileio)
......@@ -18,12 +18,12 @@ target_link_libraries(sdl_extensions_audio
if(USE_SDL2)
LINK_DIRECTORIES(${SDL_MIXER_LIBRARY_DIRS})
target_link_libraries(sdl_extensions_audio
${SDL_MIXER_LIBRARY})
else(USE_SDL2)
LINK_DIRECTORIES(${SDL2_MIXER_LIBRARY_DIRS})
target_link_libraries(sdl_extensions_audio
${SDL2_MIXER_LIBRARY})
else(USE_SDL2)
LINK_DIRECTORIES(${SDL_MIXER_LIBRARY_DIRS})
target_link_libraries(sdl_extensions_audio
${SDL_MIXER_LIBRARY})
endif(USE_SDL2)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment