Commit c6d61cdb authored by deuce's avatar deuce
Browse files

Fix for Windows (seems to work with MSVC10)

parent cb0a5308
...@@ -33,12 +33,12 @@ set(SOURCE ...@@ -33,12 +33,12 @@ set(SOURCE
xpbeep.c xpbeep.c
xpdatetime.c xpdatetime.c
xpmap.c xpmap.c
xpsem.c
xpprintf.c xpprintf.c
) )
if(NOT WIN32) if(NOT WIN32)
list(APPEND SOURCE xpevent.c) list(APPEND SOURCE xpevent.c)
list(APPEND SOURCE xpsem.c)
endif() endif()
if(SDL_AUDIO) if(SDL_AUDIO)
...@@ -84,7 +84,10 @@ if(HAS_DEV_MACHINE_SPKR_H) ...@@ -84,7 +84,10 @@ if(HAS_DEV_MACHINE_SPKR_H)
target_compile_definitions(xpdev PRIVATE HAS_DEV_MACHINE_SPKR_H) target_compile_definitions(xpdev PRIVATE HAS_DEV_MACHINE_SPKR_H)
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku") target_compile_definitions(xpdev PRIVATE WRAPPER_EXPORTS)
if(WIN32)
target_link_libraries(xpdev Iphlpapi Ws2_32 Winmm)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
target_link_libraries(xpdev m) target_link_libraries(xpdev m)
target_link_libraries(xpdev network) target_link_libraries(xpdev network)
elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
...@@ -138,7 +141,7 @@ if(PORTAUDIO2_FOUND) ...@@ -138,7 +141,7 @@ if(PORTAUDIO2_FOUND)
set(PORTAUDIO_CFLAGS PORTAUDIO2_CFLAGS) set(PORTAUDIO_CFLAGS PORTAUDIO2_CFLAGS)
else() else()
find_path(PORTAUDIO_INCLUDEDIR portaudio.h) find_path(PORTAUDIO_INCLUDEDIR portaudio.h)
if(NOT PORTAUDIO_INCLUDEDIR STREQUAL PORTAUDIO_INCLUDEIDR-NOTFOUND) if(PORTAUDIO_INCLUDEDIR)
set(PORTAUDIO_FOUND TRUE) set(PORTAUDIO_FOUND TRUE)
endif() endif()
endif() endif()
...@@ -178,11 +181,13 @@ set(INSTALL_HEADERS ...@@ -178,11 +181,13 @@ set(INSTALL_HEADERS
xpbeep.h xpbeep.h
xpdatetime.h xpdatetime.h
xpendian.h xpendian.h
xpevent.h
xpmap.h xpmap.h
xpprintf.h xpprintf.h
xpsem.h
) )
if(NOT WIN32)
list(APPEND INSTALL_HEADERS xpevent.h)
list(APPEND INSTALL_HEADERS xpsem.h)
endif()
install(TARGETS xpdev DESTINATION bin) install(TARGETS xpdev DESTINATION bin)
install(FILES ${INSTALL_HEADERS} DESTINATION include/xpdev) install(FILES ${INSTALL_HEADERS} DESTINATION include/xpdev)
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