Some more CMake white space formatting

- tabs to spaces
 - use Unix line endings everywhere
 - newline at end of file
 - remove trailing white space
 - no space between keywords and opening parenthesis
 - use 2 spaces to indent
This commit is contained in:
Thomas Otto 2024-04-21 11:02:27 +02:00
parent 8e531a5496
commit 00389c50ea
48 changed files with 828 additions and 816 deletions

View File

@ -1,13 +1,13 @@
set(HEADERS lib2d.h) set(HEADERS lib2d.h)
set(CPPS set(CPPS
font.cpp font.cpp
hardsurf.cpp hardsurf.cpp
memsurf.cpp memsurf.cpp
pen.cpp pen.cpp
pentext.cpp pentext.cpp
screen.cpp screen.cpp
surface.cpp surface.cpp
viewport.cpp) viewport.cpp)
add_library(2dlib STATIC ${HEADERS} ${CPPS}) add_library(2dlib STATIC ${HEADERS} ${CPPS})

View File

@ -1,6 +1,6 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
encoder.cpp) encoder.cpp)
add_library(AudioEncode STATIC ${HEADERS} ${CPPS}) add_library(AudioEncode STATIC ${HEADERS} ${CPPS})
target_link_libraries(AudioEncode libacm) target_link_libraries(AudioEncode libacm)

View File

@ -1,136 +1,136 @@
cmake_minimum_required(VERSION 3.19) cmake_minimum_required(VERSION 3.19)
project(Descent3 VERSION 1.5.500) project(Descent3 VERSION 1.5.500)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
if (UNIX) if(UNIX)
set(D3_GAMEDIR "~/Descent3/") set(D3_GAMEDIR "~/Descent3/")
string(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar ${BITS} ${EXTRA_CXX_FLAGS}") string(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar ${BITS} ${EXTRA_CXX_FLAGS}")
string(APPEND CMAKE_C_FLAGS " ${BITS}") string(APPEND CMAKE_C_FLAGS " ${BITS}")
find_package(SDL REQUIRED) find_package(SDL REQUIRED)
if (APPLE) if(APPLE)
# Provide FIND_PACKAGE( SDL_image ) below with an include dir and library that work with brew-installed sdl2_image # Provide FIND_PACKAGE( SDL_image ) below with an include dir and library that work with brew-installed sdl2_image
find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h PATH_SUFFIXES include/SDL2) find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h PATH_SUFFIXES include/SDL2)
find_library(SDL_IMAGE_LIBRARY SDL2_image) find_library(SDL_IMAGE_LIBRARY SDL2_image)
endif() endif()
find_package(SDL_image REQUIRED) find_package(SDL_image REQUIRED)
find_package(Curses REQUIRED) find_package(Curses REQUIRED)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
message( "SDL Include Dir is " ${SDL_INCLUDE_DIR} ) message("SDL Include Dir is " ${SDL_INCLUDE_DIR})
endif() endif()
if (UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
message("Building for Linux") message("Building for Linux")
add_definitions( -D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES) add_definitions( -D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES)
set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} ) set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR})
endif() endif()
if (APPLE) if(APPLE)
message("Building for MAC OSX") message("Building for MAC OSX")
add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES) add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES)
set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include" ) set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include")
endif() endif()
if (WIN32) if(WIN32)
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "lib/win" "lib/win/directx") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "lib/win" "lib/win/directx")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHsc /RTC1 /W3 /nologo /c /Zi /TP /errorReport:prompt") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHsc /RTC1 /W3 /nologo /c /Zi /TP /errorReport:prompt")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /FD /EHsc /W3 /nologo /c /Zi /TP /errorReport:prompt") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /FD /EHsc /W3 /nologo /c /Zi /TP /errorReport:prompt")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC")
set(CMAKE_MODULE_LINKER_FLAGS "/SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC") set(CMAKE_MODULE_LINKER_FLAGS "/SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC")
add_definitions(-DIS_WINDOWS -D_CRT_SECURE_NO_WARNINGS -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX) add_definitions(-DIS_WINDOWS -D_CRT_SECURE_NO_WARNINGS -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)
set(PLATFORM_INCLUDES "lib/win/directx" "lib/win") set(PLATFORM_INCLUDES "lib/win/directx" "lib/win")
set(CMAKE_FIND_LIBRARY_PREFIXES "") set(CMAKE_FIND_LIBRARY_PREFIXES "")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
find_library(DSOUND_LIBRARY NAMES dsound "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") find_library(DSOUND_LIBRARY NAMES dsound "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx")
find_library(DINPUT_LIBRARY NAMES dinput "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") find_library(DINPUT_LIBRARY NAMES dinput "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx")
find_library(DXGUID_LIBRARY NAMES dxguid "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") find_library(DXGUID_LIBRARY NAMES dxguid "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx")
find_library(DDRAW_LIBRARY NAMES ddraw "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") find_library(DDRAW_LIBRARY NAMES ddraw "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx")
if (MSVC AND CMAKE_CXX_SIMULATE_ID STREQUAL "") if(MSVC AND CMAKE_CXX_SIMULATE_ID STREQUAL "")
add_compile_options("/we4150") # deletion of pointer to incomplete type 'type'; no destructor called add_compile_options("/we4150") # deletion of pointer to incomplete type 'type'; no destructor called
# add_compile_options("/we4305") # truncation from 'X' to 'Y' # add_compile_options("/we4305") # truncation from 'X' to 'Y'
add_compile_options("/we4474") # too many arguments passed for format string add_compile_options("/we4474") # too many arguments passed for format string
add_compile_options("/we4700") # uninitialized local variable 'X' used add_compile_options("/we4700") # uninitialized local variable 'X' used
add_compile_options("/we4804") # unsafe use of type 'bool' in operation add_compile_options("/we4804") # unsafe use of type 'bool' in operation
add_compile_options("/we4806") # unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant add_compile_options("/we4806") # unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant
add_compile_options("/we4473") # not enough arguments passed for format string add_compile_options("/we4473") # not enough arguments passed for format string
add_compile_options("/we4477") # format string requires argument of type X but variadic argument Y has type Z add_compile_options("/we4477") # format string requires argument of type X but variadic argument Y has type Z
add_compile_options("/we4715") # 'function' : not all control paths return a value add_compile_options("/we4715") # 'function' : not all control paths return a value
add_compile_options("/we4834") # discarding return value of function with [[nodiscard]] attribute add_compile_options("/we4834") # discarding return value of function with [[nodiscard]] attribute
endif() endif()
endif () endif()
include_directories("lib" "Descent3" ${PLATFORM_INCLUDES}) include_directories("lib" "Descent3" ${PLATFORM_INCLUDES})
# file(GLOB_RECURSE INCS "*.h") # file(GLOB_RECURSE INCS "*.h")
add_subdirectory(2dlib) add_subdirectory(2dlib)
add_subdirectory(AudioEncode) add_subdirectory(AudioEncode)
add_subdirectory(bitmap) add_subdirectory(bitmap)
add_subdirectory(cfile) add_subdirectory(cfile)
add_subdirectory(czip) add_subdirectory(czip)
add_subdirectory(d3music) add_subdirectory(d3music)
if (WIN32) if(WIN32)
add_subdirectory(dd_grwin32) add_subdirectory(dd_grwin32)
add_subdirectory(dd_vidwin32) add_subdirectory(dd_vidwin32)
add_subdirectory(win32) add_subdirectory(win32)
add_subdirectory(dd_sndlib) add_subdirectory(dd_sndlib)
add_subdirectory(ddio_win) add_subdirectory(ddio_win)
endif() endif()
if (UNIX) if(UNIX)
add_subdirectory(linux) add_subdirectory(linux)
add_subdirectory(ddvid_lnx) add_subdirectory(ddvid_lnx)
add_subdirectory(dd_lnxsound) add_subdirectory(dd_lnxsound)
add_subdirectory(lnxcontroller) add_subdirectory(lnxcontroller)
add_subdirectory(ddio_lnx) add_subdirectory(ddio_lnx)
endif() endif()
add_subdirectory(ddio_common) add_subdirectory(ddio_common)
add_subdirectory(fix) add_subdirectory(fix)
add_subdirectory(manage) add_subdirectory(manage)
add_subdirectory(grtext) add_subdirectory(grtext)
add_subdirectory(mem) add_subdirectory(mem)
add_subdirectory(misc) add_subdirectory(misc)
add_subdirectory(model) add_subdirectory(model)
add_subdirectory(module) add_subdirectory(module)
add_subdirectory(movie) add_subdirectory(movie)
add_subdirectory(music) add_subdirectory(music)
add_subdirectory(networking) add_subdirectory(networking)
add_subdirectory(physics) add_subdirectory(physics)
add_subdirectory(renderer) add_subdirectory(renderer)
add_subdirectory(rtperformance) add_subdirectory(rtperformance)
add_subdirectory(sndlib) add_subdirectory(sndlib)
add_subdirectory(stream_audio) add_subdirectory(stream_audio)
add_subdirectory(ui) add_subdirectory(ui)
add_subdirectory(unzip) add_subdirectory(unzip)
add_subdirectory(vecmat) add_subdirectory(vecmat)
add_subdirectory(libmve) add_subdirectory(libmve)
add_subdirectory(md5) add_subdirectory(md5)
add_subdirectory(libacm) add_subdirectory(libacm)
add_subdirectory(Descent3) add_subdirectory(Descent3)
# For now we don't need to build the scripts under windows, so we'll only include # For now we don't need to build the scripts under windows, so we'll only include
# the directory when building for linux/osx. In the future we may want to to fix bugs, etc. # the directory when building for linux/osx. In the future we may want to to fix bugs, etc.
if(UNIX) if(UNIX)
add_subdirectory(netgames) add_subdirectory(netgames)
add_subdirectory(netcon) add_subdirectory(netcon)
add_subdirectory(scripts) add_subdirectory(scripts)
endif() endif()
# set default cmake build type to Debug (None Debug Release RelWithDebInfo MinSizeRel) # set default cmake build type to Debug (None Debug Release RelWithDebInfo MinSizeRel)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_BUILD_TYPE "Debug")
endif() endif()

View File

@ -1,309 +1,307 @@
set(HEADERS set(HEADERS
aiambient.h aiambient.h
AIGoal.h AIGoal.h
AIMain.h AIMain.h
aipath.h aipath.h
aistruct.h aistruct.h
aistruct_external.h aistruct_external.h
aiterrain.h aiterrain.h
ambient.h ambient.h
args.h args.h
attach.h attach.h
audiotaunts.h audiotaunts.h
bnode.h bnode.h
BOA.h BOA.h
Briefing.h Briefing.h
BriefingParse.h BriefingParse.h
bsp.h bsp.h
buddymenu.h buddymenu.h
buildno.h buildno.h
cinematics.h cinematics.h
cockpit.h cockpit.h
config.h config.h
ConfigItem.h ConfigItem.h
controls.h controls.h
credits.h credits.h
CtlCfgElem.h CtlCfgElem.h
ctlconfig.h ctlconfig.h
ctlconfigtxt.h ctlconfigtxt.h
D3ForceFeedback.h D3ForceFeedback.h
d3serial.h d3serial.h
damage.h damage.h
damage_external.h damage_external.h
DeathInfo.h DeathInfo.h
deathinfo_external.h deathinfo_external.h
debuggraph.h debuggraph.h
descent.h descent.h
difficulty.h difficulty.h
difficulty_external.h difficulty_external.h
DllWrappers.h DllWrappers.h
door.h door.h
doorway.h doorway.h
fireball.h fireball.h
fireball_external.h fireball_external.h
game.h game.h
gamecinematics.h gamecinematics.h
gamecinematics_external.h gamecinematics_external.h
gameevent.h gameevent.h
gamefile.h gamefile.h
gamefont.h gamefont.h
gameloop.h gameloop.h
gamepath.h gamepath.h
gamesave.h gamesave.h
gamesequence.h gamesequence.h
gametexture.h gametexture.h
gauges.h gauges.h
help.h help.h
hotspotmap.h hotspotmap.h
hud.h hud.h
init.h init.h
Inventory.h Inventory.h
levelgoal.h levelgoal.h
levelgoal_external.h levelgoal_external.h
lighting.h lighting.h
lightmap_info.h lightmap_info.h
list.h list.h
LoadLevel.h LoadLevel.h
localization.h localization.h
marker.h marker.h
matcen.h matcen.h
matcen_external.h matcen_external.h
menu.h menu.h
Mission.h Mission.h
mission_download.h mission_download.h
mmItem.h mmItem.h
multi.h multi.h
multisafe.h multisafe.h
multi_client.h multi_client.h
multi_dll_mgr.h multi_dll_mgr.h
multi_external.h multi_external.h
multi_save_settings.h multi_save_settings.h
multi_server.h multi_server.h
multi_ui.h multi_ui.h
multi_world_state.h multi_world_state.h
NewPyroGauges.h NewPyroGauges.h
newui.h newui.h
newui_core.h newui_core.h
object.h object.h
object_external.h object_external.h
object_external_struct.h object_external_struct.h
object_lighting.h object_lighting.h
objinfo.h objinfo.h
objinit.h objinit.h
ObjScript.h ObjScript.h
osiris_dll.h osiris_dll.h
osiris_predefs.h osiris_predefs.h
osiris_share.h osiris_share.h
pilot.h pilot.h
PilotPicsAPI.h PilotPicsAPI.h
pilot_class.h pilot_class.h
player.h player.h
player_external.h player_external.h
player_external_struct.h player_external_struct.h
postrender.h postrender.h
powerup.h powerup.h
procedurals.h procedurals.h
program.h program.h
render.h render.h
renderobject.h renderobject.h
resource.h resource.h
robot.h robot.h
robotfire.h robotfire.h
robotfirestruct.h robotfirestruct.h
robotfirestruct_external.h robotfirestruct_external.h
rocknride.h rocknride.h
room.h room.h
room_external.h room_external.h
scorch.h scorch.h
screens.h screens.h
ship.h ship.h
slew.h slew.h
SmallViews.h SmallViews.h
soar.h soar.h
soar_helpers.h soar_helpers.h
sounds.h sounds.h
special_face.h special_face.h
spew.h spew.h
splinter.h splinter.h
stringtable.h stringtable.h
subtitles.h subtitles.h
TelCom.h TelCom.h
TelComAutoMap.h TelComAutoMap.h
TelComCargo.h TelComCargo.h
TelComEffects.h TelComEffects.h
TelComEfxStructs.h TelComEfxStructs.h
TelComGoals.h TelComGoals.h
terrain.h terrain.h
trigger.h trigger.h
vclip.h vclip.h
vibeinterface.h vibeinterface.h
viseffect.h viseffect.h
viseffect_external.h viseffect_external.h
voice.h voice.h
weapon.h weapon.h
weapon_external.h weapon_external.h
weather.h) weather.h)
set (CPPS set(CPPS
aiambient.cpp aiambient.cpp
AIGoal.cpp AIGoal.cpp
AImain.cpp AImain.cpp
aipath.cpp aipath.cpp
aiterrain.cpp aiterrain.cpp
ambient.cpp ambient.cpp
args.cpp args.cpp
attach.cpp attach.cpp
audiotaunts.cpp audiotaunts.cpp
bnode.cpp bnode.cpp
BOA.cpp BOA.cpp
Briefing.cpp Briefing.cpp
BriefingParse.cpp BriefingParse.cpp
bsp.cpp bsp.cpp
buddymenu.cpp buddymenu.cpp
cinematics.cpp cinematics.cpp
cockpit.cpp cockpit.cpp
config.cpp config.cpp
ConfigItem.cpp ConfigItem.cpp
Controls.cpp Controls.cpp
credits.cpp credits.cpp
CtlCfgElem.cpp CtlCfgElem.cpp
ctlconfig.cpp ctlconfig.cpp
D3ForceFeedback.cpp D3ForceFeedback.cpp
d3serial.cpp d3serial.cpp
damage.cpp damage.cpp
debuggraph.cpp debuggraph.cpp
dedicated_server.cpp dedicated_server.cpp
demofile.cpp demofile.cpp
descent.cpp descent.cpp
difficulty.cpp difficulty.cpp
DllWrappers.cpp DllWrappers.cpp
door.cpp door.cpp
doorway.cpp doorway.cpp
fireball.cpp fireball.cpp
game.cpp game.cpp
Game2DLL.cpp Game2DLL.cpp
GameCheat.cpp GameCheat.cpp
gamecinematics.cpp gamecinematics.cpp
gameevent.cpp gameevent.cpp
gamefile.cpp gamefile.cpp
gamefont.cpp gamefont.cpp
GameLoop.cpp GameLoop.cpp
gamepath.cpp gamepath.cpp
gamesave.cpp gamesave.cpp
gamesequence.cpp gamesequence.cpp
gametexture.cpp gametexture.cpp
gauges.cpp gauges.cpp
help.cpp help.cpp
hotspotmap.cpp hotspotmap.cpp
hud.cpp hud.cpp
huddisplay.cpp huddisplay.cpp
hudmessage.cpp hudmessage.cpp
init.cpp init.cpp
intellivibe.cpp intellivibe.cpp
Inventory.cpp Inventory.cpp
levelgoal.cpp levelgoal.cpp
lighting.cpp lighting.cpp
lightmap_info.cpp lightmap_info.cpp
list.cpp list.cpp
LoadLevel.cpp LoadLevel.cpp
loadstate.cpp loadstate.cpp
localization.cpp localization.cpp
marker.cpp marker.cpp
matcen.cpp matcen.cpp
megacell.cpp megacell.cpp
menu.cpp menu.cpp
Mission.cpp Mission.cpp
mission_download.cpp mission_download.cpp
mmItem.cpp mmItem.cpp
multi.cpp multi.cpp
multisafe.cpp multisafe.cpp
multisafe_server.cpp multisafe_server.cpp
multi_client.cpp multi_client.cpp
multi_connect.cpp multi_connect.cpp
multi_dll_mgr.cpp multi_dll_mgr.cpp
multi_save_setting.cpp multi_save_setting.cpp
multi_server.cpp multi_server.cpp
multi_ui.cpp multi_ui.cpp
NewPyroGauges.cpp NewPyroGauges.cpp
newui.cpp newui.cpp
newui_core.cpp newui_core.cpp
newui_filedlg.cpp newui_filedlg.cpp
object.cpp object.cpp
object_lighting.cpp object_lighting.cpp
objinfo.cpp objinfo.cpp
ObjInit.cpp ObjInit.cpp
ObjScript.cpp ObjScript.cpp
OsirisLoadandBind.cpp OsirisLoadandBind.cpp
osiris_predefs.cpp osiris_predefs.cpp
pilot.cpp pilot.cpp
PilotPicsAPI.cpp PilotPicsAPI.cpp
pilot_class.cpp pilot_class.cpp
Player.cpp Player.cpp
postrender.cpp postrender.cpp
procedurals.cpp procedurals.cpp
program.cpp program.cpp
render.cpp render.cpp
renderobject.cpp renderobject.cpp
robotfire.cpp robotfire.cpp
rocknride.cpp rocknride.cpp
room.cpp room.cpp
scorch.cpp scorch.cpp
screens.cpp screens.cpp
ship.cpp ship.cpp
SLEW.cpp SLEW.cpp
SmallViews.cpp SmallViews.cpp
soar.cpp soar.cpp
soar_helpers.cpp soar_helpers.cpp
special_face.cpp special_face.cpp
spew.cpp spew.cpp
splinter.cpp splinter.cpp
subtitles.cpp subtitles.cpp
TelCom.cpp TelCom.cpp
TelComAutoMap.cpp TelComAutoMap.cpp
TelComCargo.cpp TelComCargo.cpp
TelComEffects.cpp TelComEffects.cpp
TelcomEffectsRender.cpp TelcomEffectsRender.cpp
TelComGoals.cpp TelComGoals.cpp
terrain.cpp terrain.cpp
terrainrender.cpp terrainrender.cpp
TerrainSearch.cpp TerrainSearch.cpp
trigger.cpp trigger.cpp
vclip.cpp vclip.cpp
viseffect.cpp viseffect.cpp
voice.cpp voice.cpp
weapon.cpp weapon.cpp
WeaponFire.cpp WeaponFire.cpp
weather.cpp weather.cpp)
)
if(WIN32)
set(PLATFORM_LIBS dd_sndlib dd_grwin32 dd_vidwin32 ddio_win win32 wsock32.lib winmm.lib Glu32.lib
if (WIN32) ${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY})
set (PLATFORM_LIBS dd_sndlib dd_grwin32 dd_vidwin32 ddio_win win32 wsock32.lib winmm.lib Glu32.lib set(PLATFORM_CPPS winmain.cpp)
${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY}) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC")
set(PLATFORM_CPPS winmain.cpp ) endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBC")
endif() if(UNIX AND NOT APPLE)
set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL::SDL m ${CMAKE_DL_LIBS} OpenGL::GLU ${CURSES_LIBRARIES})
if (UNIX AND NOT APPLE) set(PLATFORM_CPPS loki_utils.c lnxmain.cpp)
set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL::SDL m ${CMAKE_DL_LIBS} OpenGL::GLU ${CURSES_LIBRARIES}) endif()
set(PLATFORM_CPPS loki_utils.c lnxmain.cpp)
endif() if(APPLE)
set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL::SDL ${CURSES_LIBRARIES})
if (APPLE) set(PLATFORM_CPPS loki_utils.c lnxmain.cpp SDLMain.m)
set (PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL::SDL ${CURSES_LIBRARIES}) set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework Cocoa -framework OpenGL -framework Carbon")
set (PLATFORM_CPPS loki_utils.c lnxmain.cpp SDLMain.m) endif()
set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework Cocoa -framework OpenGL -framework Carbon")
endif() file(GLOB_RECURSE INCS "../lib/*.h")
file(GLOB_RECURSE INCS "../lib/*.h") add_executable(Descent3 ${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS})
target_link_libraries(Descent3
add_executable(Descent3 ${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS}) 2dlib AudioEncode bitmap cfile czip d3music ddio_common libmve libacm
target_link_libraries(Descent3 fix grtext manage mem misc model module movie stream_audio
2dlib AudioEncode bitmap cfile czip d3music ddio_common libmve libacm music networking physics renderer rtperformance sndlib ui unzip vecmat md5
fix grtext manage mem misc model module movie stream_audio ${PLATFORM_LIBS})
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS}) if(WIN32)
set_target_properties(Descent3 PROPERTIES WIN32_EXECUTABLE ON)
if (WIN32) endif()
set_target_properties(Descent3 PROPERTIES WIN32_EXECUTABLE ON)
endif()

View File

@ -1,5 +1,5 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
acmlib.cpp) acmlib.cpp)
add_library(acmlib STATIC ${HEADERS} ${CPPS}) add_library(acmlib STATIC ${HEADERS} ${CPPS})

View File

@ -1,10 +1,10 @@
set(HEADERS iff.h) set(HEADERS iff.h)
set(CPPS set(CPPS
bitmain.cpp bitmain.cpp
bumpmap.cpp bumpmap.cpp
iff.cpp iff.cpp
lightmap.cpp lightmap.cpp
pcx.cpp pcx.cpp
tga.cpp) tga.cpp)
add_library(bitmap STATIC ${HEADERS} ${CPPS}) add_library(bitmap STATIC ${HEADERS} ${CPPS})

View File

@ -1,7 +1,7 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
CFILE.cpp CFILE.cpp
hog.cpp hog.cpp
InfFile.cpp) InfFile.cpp)
add_library(cfile STATIC ${HEADERS} ${CPPS}) add_library(cfile STATIC ${HEADERS} ${CPPS})

View File

@ -1,8 +1,8 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
BitIO.cpp BitIO.cpp
CZip.cpp CZip.cpp
HuffmanAdapt.cpp HuffmanAdapt.cpp
HuffmanBasic.cpp) HuffmanBasic.cpp)
add_library(czip STATIC ${HEADERS} ${CPPS}) add_library(czip STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS) set(HEADERS)
set(CPPS set(CPPS
musicapi.cpp) musicapi.cpp)
add_library(d3music STATIC ${HEADERS} ${CPPS}) add_library(d3music STATIC ${HEADERS} ${CPPS})

View File

@ -1,11 +1,11 @@
set(HEADERS set(HEADERS
ddgrWin32.h ddgrWin32.h
ddgrWin32DX.h ddgrWin32DX.h
ddgrWin32GDI.h) ddgrWin32GDI.h)
set(CPPS set(CPPS
ddgrWin32API.cpp ddgrWin32API.cpp
ddgrWin32DX.cpp ddgrWin32DX.cpp
ddgrWin32GDI.cpp ddgrWin32GDI.cpp
ddgrWin32Init.cpp) ddgrWin32Init.cpp)
add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS}) add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS})

View File

@ -1,4 +1,4 @@
set(HEADERS ddlnxsound.h ) set(HEADERS ddlnxsound.h)
set(CPPS mixer.cpp sdlsound.cpp ../dd_sndlib/ssl_lib.cpp ../dd_sndlib/ddsoundload.cpp) set(CPPS mixer.cpp sdlsound.cpp ../dd_sndlib/ssl_lib.cpp ../dd_sndlib/ddsoundload.cpp)
add_library(dd_lnxsound STATIC ${HEADERS} ${CPPS}) add_library(dd_lnxsound STATIC ${HEADERS} ${CPPS})

View File

@ -1,18 +1,18 @@
set(HEADERS set(HEADERS
auddev.h auddev.h
ds3dlib_internal.h ds3dlib_internal.h
eax.h eax.h
eax2.h eax2.h
ia3dapi.h ia3dapi.h
Ia3dutil.h Ia3dutil.h
vmanpset.h) vmanpset.h)
set(CPPS set(CPPS
aureal3d.cpp aureal3d.cpp
ddsoundload.cpp ddsoundload.cpp
Ds3dlib.cpp Ds3dlib.cpp
dsound3d.cpp dsound3d.cpp
eax.cpp eax.cpp
geometry.cpp geometry.cpp
ssl_lib.cpp) ssl_lib.cpp)
add_library(dd_sndlib STATIC ${HEADERS} ${CPPS}) add_library(dd_sndlib STATIC ${HEADERS} ${CPPS})

View File

@ -1,8 +1,8 @@
set(HEADERS set(HEADERS
ddvidlib.h) ddvidlib.h)
set(CPPS set(CPPS
video_win32.cpp video_win32.cpp
vidWin32FS.cpp vidWin32FS.cpp
vidWin32Win.cpp) vidWin32Win.cpp)
add_library(dd_vidwin32 STATIC ${HEADERS} ${CPPS}) add_library(dd_vidwin32 STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS) set(HEADERS)
set(CPPS set(CPPS
ddio.cpp ddio.cpp
key.cpp) key.cpp)
add_library(ddio_common STATIC ${HEADERS} ${CPPS}) add_library(ddio_common STATIC ${HEADERS} ${CPPS})

View File

@ -1,4 +1,15 @@
set(HEADERS ddio_lnx.h) set(HEADERS ddio_lnx.h)
set(CPPS lnxfile.cpp lnxforcefeedback.cpp lnxio.cpp sdljoy.cpp lnxkey.cpp lnxkey_null.cpp lnxmouse.cpp lnxtimer.cpp lnxkey_raw.cpp lnxcdrom.cpp lnxkey_sdl.cpp) set(CPPS
lnxfile.cpp
lnxforcefeedback.cpp
lnxio.cpp
sdljoy.cpp
lnxkey.cpp
lnxkey_null.cpp
lnxmouse.cpp
lnxtimer.cpp
lnxkey_raw.cpp
lnxcdrom.cpp
lnxkey_sdl.cpp)
add_library(ddio_lnx STATIC ${HEADERS} ${CPPS}) add_library(ddio_lnx STATIC ${HEADERS} ${CPPS})

View File

@ -1,12 +1,12 @@
set(HEADERS ddio_win.h ) set(HEADERS ddio_win.h)
set(CPPS set(CPPS
serial.cpp serial.cpp
winfile.cpp winfile.cpp
winforcefeedback.cpp winforcefeedback.cpp
winio.cpp winio.cpp
winjoy.cpp winjoy.cpp
winkey.cpp winkey.cpp
winmouse.cpp winmouse.cpp
wintimer.cpp) wintimer.cpp)
add_library(ddio_win STATIC ${HEADERS} ${CPPS}) add_library(ddio_win STATIC ${HEADERS} ${CPPS})

View File

@ -2,4 +2,4 @@ set(HEADERS)
set(CPPS set(CPPS
video_lnx.cpp) video_lnx.cpp)
add_library(ddvid_lnx STATIC ${HEADERS} ${CPPS}) add_library(ddvid_lnx STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set (HEADERS ) set(HEADERS)
set (CPPS set(CPPS
fix.cpp) fix.cpp)
add_library(fix STATIC ${HEADERS} ${CPPS}) add_library(fix STATIC ${HEADERS} ${CPPS})

View File

@ -1,7 +1,7 @@
set(HEADERS grtextlib.h ) set(HEADERS grtextlib.h)
set(CPPS set(CPPS
grfont.cpp grfont.cpp
grtext.cpp grtext.cpp
textaux.cpp) textaux.cpp)
add_library(grtext STATIC ${HEADERS} ${CPPS}) add_library(grtext STATIC ${HEADERS} ${CPPS})

View File

@ -1,6 +1,6 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
aencode.cpp aencode.cpp
libacm.cpp) libacm.cpp)
add_library(libacm STATIC ${HEADERS} ${CPPS}) add_library(libacm STATIC ${HEADERS} ${CPPS})

View File

@ -1,18 +1,19 @@
set(HEADERS mvegfx.h set(HEADERS
mvelibi.h mvegfx.h
mvelibl.h mvelibi.h
platform.h mvelibl.h
snd8to16.h platform.h
SystemInterfaces.h ) snd8to16.h
SystemInterfaces.h)
set(CPPS set(CPPS
mveasm.cpp mveasm.cpp
mvelibl.cpp mvelibl.cpp
platform.cpp) platform.cpp)
set(PLATFORM_CPPS ) set(PLATFORM_CPPS)
if (UNIX) if(UNIX)
set (PLATFORM_CPPS "lnxdsound.cpp") set(PLATFORM_CPPS "lnxdsound.cpp")
endif() endif()
add_library(libmve STATIC ${HEADERS} ${CPPS} ${PLATFORM_CPPS}) add_library(libmve STATIC ${HEADERS} ${CPPS} ${PLATFORM_CPPS})

View File

@ -1,4 +1,4 @@
set(HEADERS registry.h ) set(HEADERS registry.h)
set(CPPS set(CPPS
lnxcon.cpp lnxcon.cpp
lnxcon_raw.cpp lnxcon_raw.cpp
@ -9,4 +9,4 @@ set(CPPS
lnxmono.cpp lnxmono.cpp
registry.cpp) registry.cpp)
# DynXLib.cpp # DynXLib.cpp
add_library(linux STATIC ${HEADERS} ${CPPS}) add_library(linux STATIC ${HEADERS} ${CPPS})

View File

@ -1,6 +1,4 @@
set (HEADERS ) set(HEADERS)
set (CPPS set(CPPS lnxcontroller.cpp)
lnxcontroller.cpp
)
add_library(lnxcontroller STATIC ${HEADERS} ${CPPS}) add_library(lnxcontroller STATIC ${HEADERS} ${CPPS})

View File

@ -1,4 +1,13 @@
set(HEADERS dyna_pthread.h dyna_xext.h dyna_xwin.h lnxdsound.h mvegfx.h mvelibi.h mvelibl.h snd8to16.h ) set(HEADERS
dyna_pthread.h
dyna_xext.h
dyna_xwin.h
lnxdsound.h
mvegfx.h
mvelibi.h
mvelibl.h
snd8to16.h)
set(CPPS set(CPPS
lnxdraw.cpp lnxdraw.cpp
lnxdsound.cpp lnxdsound.cpp
@ -7,4 +16,4 @@ set(CPPS
# asmstub.c # asmstub.c
add_library(lnxmvelib STATIC ${HEADERS} ${CPPS}) add_library(lnxmvelib STATIC ${HEADERS} ${CPPS})

View File

@ -1,23 +1,24 @@
set(HEADERS doorpage.h set(HEADERS
gamefilepage.h doorpage.h
genericpage.h gamefilepage.h
megapage.h genericpage.h
powerpage.h megapage.h
robotpage.h powerpage.h
shippage.h robotpage.h
soundpage.h shippage.h
texpage.h soundpage.h
weaponpage.h ) texpage.h
weaponpage.h)
set(CPPS set(CPPS
doorpage.cpp doorpage.cpp
gamefilepage.cpp gamefilepage.cpp
generic.cpp generic.cpp
manage.cpp manage.cpp
megapage.cpp megapage.cpp
pagelock.cpp pagelock.cpp
shippage.cpp shippage.cpp
soundpage.cpp soundpage.cpp
texpage.cpp texpage.cpp
weaponpage.cpp) weaponpage.cpp)
add_library(manage STATIC ${HEADERS} ${CPPS}) add_library(manage STATIC ${HEADERS} ${CPPS})

View File

@ -1,7 +1,7 @@
set(HEADERS md5.h) set(HEADERS md5.h)
set(CPPS set(CPPS
md5.cpp) md5.cpp)
set(PLATFORMCPPS ) set(PLATFORMCPPS)
add_library(md5 STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) add_library(md5 STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
mem.cpp) mem.cpp)
add_library(mem STATIC ${HEADERS} ${CPPS}) add_library(mem STATIC ${HEADERS} ${CPPS})

View File

@ -1,10 +1,10 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
endian.cpp endian.cpp
error.cpp error.cpp
logfile.cpp logfile.cpp
psglob.cpp psglob.cpp
psrand.cpp psrand.cpp
pstring.cpp) pstring.cpp)
add_library(misc STATIC ${HEADERS} ${CPPS}) add_library(misc STATIC ${HEADERS} ${CPPS})

View File

@ -1,6 +1,6 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
newstyle.cpp newstyle.cpp
polymodel.cpp) polymodel.cpp)
add_library(model STATIC ${HEADERS} ${CPPS}) add_library(model STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
module.cpp) module.cpp)
add_library(module STATIC ${HEADERS} ${CPPS}) add_library(module STATIC ${HEADERS} ${CPPS})

View File

@ -1,6 +1,6 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
d3movie.cpp) d3movie.cpp)
add_library(movie STATIC ${HEADERS} ${CPPS}) add_library(movie STATIC ${HEADERS} ${CPPS})
target_link_libraries(movie libmve) target_link_libraries(movie libmve)

View File

@ -1,8 +1,8 @@
set(HEADERS) set(HEADERS)
set(CPPS set(CPPS
omflex.cpp omflex.cpp
sequencer.cpp sequencer.cpp
streamer.cpp streamer.cpp
tracklist.cpp) tracklist.cpp)
add_library(music STATIC ${HEADERS} ${CPPS}) add_library(music STATIC ${HEADERS} ${CPPS})

View File

@ -1,3 +1,3 @@
include_directories("includes") include_directories("includes")
add_subdirectory(inetfile) add_subdirectory(inetfile)
add_subdirectory(lanclient) add_subdirectory(lanclient)

View File

@ -1,9 +1,8 @@
set(HEADERS) set(HEADERS)
set(CPPS set(CPPS
CFtp.cpp CFtp.cpp
Chttpget.cpp Chttpget.cpp
inetgetfile.cpp inetgetfile.cpp)
)
add_library(inetfile STATIC ${HEADERS} ${CPPS}) add_library(inetfile STATIC ${HEADERS} ${CPPS})

View File

@ -8,4 +8,4 @@ add_subdirectory(hoard)
add_subdirectory(hyperanarchy) add_subdirectory(hyperanarchy)
add_subdirectory(monsterball) add_subdirectory(monsterball)
add_subdirectory(roboanarchy) add_subdirectory(roboanarchy)
add_subdirectory(tanarchy) add_subdirectory(tanarchy)

View File

@ -1,28 +1,28 @@
set(HEADERS dmfcdllinit.h set(HEADERS
dmfcdllinit.h
dmfcinputcommands.h dmfcinputcommands.h
dmfcinternal.h dmfcinternal.h
encryption.h encryption.h)
)
set(CPPS set(CPPS
dmfcbase.cpp dmfcbase.cpp
dmfccfg.cpp dmfccfg.cpp
dmfcclient.cpp dmfcclient.cpp
dmfcfunctions.cpp dmfcfunctions.cpp
dmfchudmessages.cpp dmfchudmessages.cpp
dmfcinputcommand.cpp dmfcinputcommand.cpp
dmfcmenu.cpp dmfcmenu.cpp
dmfcpackets.cpp dmfcpackets.cpp
dmfcpinfo.cpp dmfcpinfo.cpp
dmfcprecord.cpp dmfcprecord.cpp
dmfcremote.cpp dmfcremote.cpp
dmfcserver.cpp dmfcserver.cpp
dmfcstats.cpp dmfcstats.cpp
dmfctimer.cpp dmfctimer.cpp
dmfcui.cpp dmfcui.cpp
dmfcvirtual.cpp dmfcvirtual.cpp
idmfc.cpp idmfc.cpp
encryption.cpp encryption.cpp
dmfcinterface.cpp) dmfcinterface.cpp)
add_definitions(-DOUTRAGE_VERSION -DDMFC_DLL) add_definitions(-DOUTRAGE_VERSION -DDMFC_DLL)

View File

@ -1,7 +1,7 @@
set(HEADERS hoardaux.h Hoard.h hoardstr.h) set(HEADERS hoardaux.h Hoard.h hoardstr.h)
set(CPPS hoard.cpp hoard_ui.cpp) set(CPPS hoard.cpp hoard_ui.cpp)
set (NETGAME_MODULE hoard) set(NETGAME_MODULE hoard)
add_library(${NETGAME_MODULE} SHARED ${CPPS} ${HEADERS}) add_library(${NETGAME_MODULE} SHARED ${CPPS} ${HEADERS})
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")

View File

@ -1,11 +1,11 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
networking.cpp) networking.cpp)
set(PLATFORMCPPS) set(PLATFORMCPPS)
if(WIN32) if(WIN32)
set(PLATFORMCPPS "directplay.cpp") set(PLATFORMCPPS "directplay.cpp")
endif() endif()
add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS})

View File

@ -1,8 +1,8 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
Collide.cpp Collide.cpp
FindIntersection.cpp FindIntersection.cpp
newstyle_fi.cpp newstyle_fi.cpp
physics.cpp) physics.cpp)
add_library(physics STATIC ${HEADERS} ${CPPS}) add_library(physics STATIC ${HEADERS} ${CPPS})

View File

@ -1,29 +1,29 @@
set(HEADERS set(HEADERS
dyna_gl.h dyna_gl.h
HardwareInternal.h HardwareInternal.h
RendererConfig.h RendererConfig.h
SoftwareInternal.h) SoftwareInternal.h)
set(CPPS set(CPPS
HardwareClipper.cpp HardwareClipper.cpp
HardwareDraw.cpp HardwareDraw.cpp
HardwareGlobalVars.cpp HardwareGlobalVars.cpp
HardwareInstance.cpp HardwareInstance.cpp
HardwareOpenGL.cpp HardwareOpenGL.cpp
HardwarePoints.cpp HardwarePoints.cpp
HardwareSetup.cpp HardwareSetup.cpp
HardwareTransforms.cpp HardwareTransforms.cpp
SoftwareClipper.cpp SoftwareClipper.cpp
SoftwareDraw.cpp SoftwareDraw.cpp
SoftwareGlobalVars.cpp SoftwareGlobalVars.cpp
SoftwareInstance.cpp SoftwareInstance.cpp
SoftwareOpenGL.cpp SoftwareOpenGL.cpp
SoftwareOpenGLMeshBuilder.cpp SoftwareOpenGLMeshBuilder.cpp
SoftwarePoints.cpp SoftwarePoints.cpp
SoftwareSetup.cpp) SoftwareSetup.cpp)
if(UNIX) if(UNIX)
set (CPPS ${CPPS} lnxscreenmode.cpp) set(CPPS ${CPPS} lnxscreenmode.cpp)
endif() endif()
# These are excluded. # These are excluded.
@ -31,4 +31,4 @@ endif()
#renderer.cpp #renderer.cpp
#Direct3D.cpp #Direct3D.cpp
add_library(renderer STATIC ${HEADERS} ${CPPS}) add_library(renderer STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS) set(HEADERS)
set(CPPS set(CPPS
rtperformance.cpp) rtperformance.cpp)
add_library(rtperformance STATIC ${HEADERS} ${CPPS}) add_library(rtperformance STATIC ${HEADERS} ${CPPS})

View File

@ -1,86 +1,83 @@
add_definitions(-DCHECKSUM=2273873307UL)
add_definitions (-DCHECKSUM=2273873307UL)
set(HEADERS) set(HEADERS)
set(CPPS) set(CPPS)
if(UNIX) if(UNIX)
set (CPPS set(CPPS
linux_lib.cpp) linux_lib.cpp)
endif() endif()
set(SCRIPTS set(SCRIPTS
aigame2 aigame2
AIGame3 AIGame3
aigame4 aigame4
AIGame AIGame
barney barney
BatteriesIncluded BatteriesIncluded
BossCamera BossCamera
CanyonsCTF CanyonsCTF
CellTestLevel CellTestLevel
ChrisTest ChrisTest
clutter clutter
GameGauge GameGauge
generic generic
Geodomes Geodomes
HalfPipe HalfPipe
InfernalBolt InfernalBolt
Inversion Inversion
LEVEL0 LEVEL0
level10 level10
level11 level11
Level12 Level12
level13 level13
level14 level14
LEVEL15 LEVEL15
Level16 Level16
level17 level17
level1 level1
level2 level2
level3 level3
level4 level4
level5 level5
Level6 Level6
level7 level7
level8 level8
Level9 Level9
LevelS1 LevelS1
levelS2 levelS2
Merc02 Merc02
Merc1 Merc1
Merc3 Merc3
Merc4 Merc4
merc5 merc5
Merc6 Merc6
Merc7 Merc7
myPowerHouse myPowerHouse
Mysterious_Isle Mysterious_Isle
orbital orbital
Paranoia Paranoia
PiccuStation PiccuStation
Polaris Polaris
Quadsomniac Quadsomniac
RudeAwakening RudeAwakening
SewerRat SewerRat
testscript testscript
TrainingMission TrainingMission
Y2K) Y2K)
foreach(SCRIPT ${SCRIPTS}) foreach(SCRIPT ${SCRIPTS})
add_library(${SCRIPT} SHARED ${CPPS} "${SCRIPT}.cpp") add_library(${SCRIPT} SHARED ${CPPS} "${SCRIPT}.cpp")
set_target_properties(${SCRIPT} PROPERTIES PREFIX "") set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
if(UNIX) if(UNIX)
add_custom_command( add_custom_command(
TARGET ${SCRIPT} TARGET ${SCRIPT}
POST_BUILD POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/" COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/"
COMMENT "Copying file ${SCRIPT} to hogfile directory..." COMMENT "Copying file ${SCRIPT} to hogfile directory...")
) add_custom_command(
add_custom_command( TARGET ${SCRIPT}
TARGET ${SCRIPT} POST_BUILD
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/")
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/" endif()
)
endif()
endforeach() endforeach()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
@ -89,23 +86,21 @@ if(UNIX AND NOT APPLE)
add_custom_target("FullLinuxHog" add_custom_target("FullLinuxHog"
ALL ALL
COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxfullhog.txt" COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxfullhog.txt"
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog" COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog" COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog" "${CMAKE_BINARY_DIR}" COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog" "${CMAKE_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog" COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/"
DEPENDS ${SCRIPTS} DEPENDS ${SCRIPTS}
COMMENT "Building platform specific hog." COMMENT "Building platform specific hog.")
)
add_custom_target("DemoLinuxHog" add_custom_target("DemoLinuxHog"
ALL ALL
COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxdemohog.txt" COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxdemohog.txt"
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog" COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog" COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog"
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog" COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/"
DEPENDS ${SCRIPTS} DEPENDS ${SCRIPTS}
COMMENT "Building platform specific hog." COMMENT "Building platform specific hog.")
)
endif() endif()

View File

@ -1,7 +1,7 @@
set(HEADERS sndrender.h ) set(HEADERS sndrender.h)
set(CPPS set(CPPS
hlsoundlib.cpp hlsoundlib.cpp
sndrender.cpp sndrender.cpp
soundload.cpp) soundload.cpp)
add_library(sndlib STATIC ${HEADERS} ${CPPS}) add_library(sndlib STATIC ${HEADERS} ${CPPS})

View File

@ -1,7 +1,7 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
osfarchive.cpp osfarchive.cpp
streamaudio.cpp) streamaudio.cpp)
add_library(stream_audio STATIC ${HEADERS} ${CPPS}) add_library(stream_audio STATIC ${HEADERS} ${CPPS})
target_link_libraries(stream_audio libacm) target_link_libraries(stream_audio libacm)

View File

@ -1,19 +1,19 @@
set(HEADERS UIlib.h) set(HEADERS UIlib.h)
set(CPPS set(CPPS
UIButton.cpp UIButton.cpp
UICombo.cpp UICombo.cpp
UIConsole.cpp UIConsole.cpp
UIDraw.cpp UIDraw.cpp
UIEdit.cpp UIEdit.cpp
UIGadget.cpp UIGadget.cpp
UIGroup.cpp UIGroup.cpp
UIHotspot.cpp UIHotspot.cpp
UIListBox.cpp UIListBox.cpp
UIObject.cpp UIObject.cpp
UIRes.cpp UIRes.cpp
UISlider.cpp UISlider.cpp
UIStatic.cpp UIStatic.cpp
UISystem.cpp UISystem.cpp
UIWindow.cpp) UIWindow.cpp)
add_library(ui STATIC ${HEADERS} ${CPPS}) add_library(ui STATIC ${HEADERS} ${CPPS})

View File

@ -1,21 +1,21 @@
set(HEADERS infblock.h set(HEADERS
infcodes.h infblock.h
inffast.h infcodes.h
inffixed.h inffast.h
inftrees.h inffixed.h
infutil.h inftrees.h
zconf.h infutil.h
zlib.h zconf.h
zutil.h ) zlib.h
zutil.h)
set(CPPS set(CPPS
unzip.cpp unzip.cpp
adler32.c adler32.c
infblock.c infblock.c
infcodes.c infcodes.c
inffast.c inffast.c
inflate.c inflate.c
inftrees.c inftrees.c
infutil.c infutil.c)
)
add_library(unzip STATIC ${HEADERS} ${CPPS}) add_library(unzip STATIC ${HEADERS} ${CPPS})

View File

@ -1,5 +1,5 @@
set(HEADERS ) set(HEADERS)
set(CPPS set(CPPS
vector.cpp) vector.cpp)
add_library(vecmat STATIC ${HEADERS} ${CPPS}) add_library(vecmat STATIC ${HEADERS} ${CPPS})

View File

@ -1,11 +1,11 @@
set(HEADERS win32os.h ) set(HEADERS win32os.h)
set(CPPS set(CPPS
winapp.cpp winapp.cpp
wincon.cpp wincon.cpp
WinController.cpp WinController.cpp
windata.cpp windata.cpp
windebug.cpp windebug.cpp
winmono.cpp winmono.cpp
wintask.cpp) wintask.cpp)
add_library(win32 STATIC ${HEADERS} ${CPPS}) add_library(win32 STATIC ${HEADERS} ${CPPS})