Commit 3a7bad03 authored by deuce's avatar deuce
Browse files

Remove unsupported (yet) options and set WITH_SDL correctly.

parent 8d061785
......@@ -8,9 +8,6 @@ INCLUDE (FindX11)
INCLUDE (FindCurses)
INCLUDE (FindThreads)
option(X11 "Set to OFF to disable X11" ON)
option(SDL "Set to OFF to disable SDL" ON)
set(SOURCE
ansi_cio.c
ciolib.c
......@@ -37,17 +34,13 @@ if(X11_FOUND)
endif()
if(SDL_FOUND)
# TODO: This should be included if XPDev is set up with SDL_Audio...
list(APPEND SOURCE sdl_con.c)
if(SDL)
# TODO: This should NOT be included unless SDL is on
list(APPEND SOURCE sdlfuncs.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND SOURCE SDLMain.m)
endif()
set(NEED_BITMAP TRUE)
set(NEED_DLOPEN TRUE)
list(APPEND SOURCE sdlfuncs.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND SOURCE SDLMain.m)
endif()
set(NEED_BITMAP TRUE)
set(NEED_DLOPEN TRUE)
endif()
if(NEED_BITMAP)
......@@ -60,12 +53,12 @@ include(${XPDev_CONFIG})
add_dependencies(ciolib xpdev)
target_include_directories(ciolib PRIVATE "${XPDev_DIR}/../../../include/xpdev")
target_compile_definitions(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(ciolib xpdev)
if(SDL_FOUND)
if(SDL)
target_include_directories(ciolib PRIVATE ${SDL_INCLUDE_DIR})
endif()
target_include_directories(ciolib PRIVATE ${SDL_INCLUDE_DIR})
target_compile_definitions(ciolib PUBLIC WITH_SDL)
endif()
if(NEED_BITMAP)
......
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