From 00389c50ea2c1ebebf507ff5a230e36e7dd7feb1 Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Sun, 21 Apr 2024 11:02:27 +0200 Subject: [PATCH] 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 --- 2dlib/CMakeLists.txt | 18 +- AudioEncode/CMakeLists.txt | 12 +- CMakeLists.txt | 272 +++++++-------- Descent3/CMakeLists.txt | 616 ++++++++++++++++----------------- acmlib/CMakeLists.txt | 6 +- bitmap/CMakeLists.txt | 14 +- cfile/CMakeLists.txt | 10 +- czip/CMakeLists.txt | 12 +- d3music/CMakeLists.txt | 4 +- dd_grwin32/CMakeLists.txt | 18 +- dd_lnxsound/CMakeLists.txt | 4 +- dd_sndlib/CMakeLists.txt | 32 +- dd_vidwin32/CMakeLists.txt | 12 +- ddio_common/CMakeLists.txt | 6 +- ddio_lnx/CMakeLists.txt | 15 +- ddio_win/CMakeLists.txt | 20 +- ddvid_lnx/CMakeLists.txt | 2 +- fix/CMakeLists.txt | 8 +- grtext/CMakeLists.txt | 10 +- libacm/CMakeLists.txt | 12 +- libmve/CMakeLists.txt | 25 +- linux/CMakeLists.txt | 4 +- lnxcontroller/CMakeLists.txt | 8 +- lnxmvelib/CMakeLists.txt | 13 +- manage/CMakeLists.txt | 43 +-- md5/CMakeLists.txt | 4 +- mem/CMakeLists.txt | 6 +- misc/CMakeLists.txt | 16 +- model/CMakeLists.txt | 8 +- module/CMakeLists.txt | 6 +- movie/CMakeLists.txt | 6 +- music/CMakeLists.txt | 10 +- netcon/CMakeLists.txt | 2 +- netcon/inetfile/CMakeLists.txt | 5 +- netgames/CMakeLists.txt | 2 +- netgames/dmfc/CMakeLists.txt | 34 +- netgames/hoard/CMakeLists.txt | 2 +- networking/CMakeLists.txt | 8 +- physics/CMakeLists.txt | 12 +- renderer/CMakeLists.txt | 48 +-- rtperformance/CMakeLists.txt | 4 +- scripts/CMakeLists.txt | 157 ++++----- sndlib/CMakeLists.txt | 10 +- stream_audio/CMakeLists.txt | 14 +- ui/CMakeLists.txt | 32 +- unzip/CMakeLists.txt | 38 +- vecmat/CMakeLists.txt | 6 +- win32/CMakeLists.txt | 18 +- 48 files changed, 828 insertions(+), 816 deletions(-) diff --git a/2dlib/CMakeLists.txt b/2dlib/CMakeLists.txt index 9e59efdb..a0300092 100644 --- a/2dlib/CMakeLists.txt +++ b/2dlib/CMakeLists.txt @@ -1,13 +1,13 @@ set(HEADERS lib2d.h) set(CPPS - font.cpp - hardsurf.cpp - memsurf.cpp - pen.cpp - pentext.cpp - screen.cpp - surface.cpp - viewport.cpp) + font.cpp + hardsurf.cpp + memsurf.cpp + pen.cpp + pentext.cpp + screen.cpp + surface.cpp + viewport.cpp) add_library(2dlib STATIC ${HEADERS} ${CPPS}) - \ No newline at end of file + diff --git a/AudioEncode/CMakeLists.txt b/AudioEncode/CMakeLists.txt index b1de0b19..8415e67b 100644 --- a/AudioEncode/CMakeLists.txt +++ b/AudioEncode/CMakeLists.txt @@ -1,6 +1,6 @@ -set(HEADERS ) -set(CPPS - encoder.cpp) - -add_library(AudioEncode STATIC ${HEADERS} ${CPPS}) -target_link_libraries(AudioEncode libacm) \ No newline at end of file +set(HEADERS) +set(CPPS + encoder.cpp) + +add_library(AudioEncode STATIC ${HEADERS} ${CPPS}) +target_link_libraries(AudioEncode libacm) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98a49d36..533276f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,136 +1,136 @@ -cmake_minimum_required(VERSION 3.19) - -project(Descent3 VERSION 1.5.500) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CMAKE_CXX_EXTENSIONS OFF) - -if (UNIX) - set(D3_GAMEDIR "~/Descent3/") - - string(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar ${BITS} ${EXTRA_CXX_FLAGS}") - string(APPEND CMAKE_C_FLAGS " ${BITS}") - - find_package(SDL REQUIRED) - if (APPLE) - # 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_library(SDL_IMAGE_LIBRARY SDL2_image) - endif() - - find_package(SDL_image REQUIRED) - find_package(Curses REQUIRED) - find_package(OpenGL REQUIRED) -message( "SDL Include Dir is " ${SDL_INCLUDE_DIR} ) -endif() - -if (UNIX AND NOT APPLE) - 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) - set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} ) -endif() - -if (APPLE) - 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) - set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include" ) -endif() - -if (WIN32) - 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_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_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) - - set(PLATFORM_INCLUDES "lib/win/directx" "lib/win") - - set(CMAKE_FIND_LIBRARY_PREFIXES "") - 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(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(DDRAW_LIBRARY NAMES ddraw "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") - - 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("/we4305") # truncation from 'X' to 'Y' - add_compile_options("/we4474") # too many arguments passed for format string - add_compile_options("/we4700") # uninitialized local variable 'X' used - 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("/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("/we4715") # 'function' : not all control paths return a value - add_compile_options("/we4834") # discarding return value of function with [[nodiscard]] attribute - endif() -endif () - -include_directories("lib" "Descent3" ${PLATFORM_INCLUDES}) - -# file(GLOB_RECURSE INCS "*.h") - -add_subdirectory(2dlib) -add_subdirectory(AudioEncode) -add_subdirectory(bitmap) -add_subdirectory(cfile) -add_subdirectory(czip) -add_subdirectory(d3music) - -if (WIN32) - add_subdirectory(dd_grwin32) - add_subdirectory(dd_vidwin32) - add_subdirectory(win32) - add_subdirectory(dd_sndlib) - add_subdirectory(ddio_win) -endif() - -if (UNIX) - add_subdirectory(linux) - add_subdirectory(ddvid_lnx) - add_subdirectory(dd_lnxsound) - add_subdirectory(lnxcontroller) - add_subdirectory(ddio_lnx) -endif() - -add_subdirectory(ddio_common) -add_subdirectory(fix) -add_subdirectory(manage) -add_subdirectory(grtext) -add_subdirectory(mem) -add_subdirectory(misc) -add_subdirectory(model) -add_subdirectory(module) -add_subdirectory(movie) -add_subdirectory(music) -add_subdirectory(networking) -add_subdirectory(physics) -add_subdirectory(renderer) -add_subdirectory(rtperformance) -add_subdirectory(sndlib) -add_subdirectory(stream_audio) -add_subdirectory(ui) -add_subdirectory(unzip) -add_subdirectory(vecmat) -add_subdirectory(libmve) -add_subdirectory(md5) -add_subdirectory(libacm) -add_subdirectory(Descent3) - -# 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. -if(UNIX) - add_subdirectory(netgames) - add_subdirectory(netcon) - add_subdirectory(scripts) -endif() - -# set default cmake build type to Debug (None Debug Release RelWithDebInfo MinSizeRel) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug") -endif() +cmake_minimum_required(VERSION 3.19) + +project(Descent3 VERSION 1.5.500) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +if(UNIX) + set(D3_GAMEDIR "~/Descent3/") + + string(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar ${BITS} ${EXTRA_CXX_FLAGS}") + string(APPEND CMAKE_C_FLAGS " ${BITS}") + + find_package(SDL REQUIRED) + if(APPLE) + # 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_library(SDL_IMAGE_LIBRARY SDL2_image) + endif() + + find_package(SDL_image REQUIRED) + find_package(Curses REQUIRED) + find_package(OpenGL REQUIRED) + message("SDL Include Dir is " ${SDL_INCLUDE_DIR}) +endif() + +if(UNIX AND NOT APPLE) + 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) + set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR}) +endif() + +if(APPLE) + 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) + set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include") +endif() + +if(WIN32) + 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_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_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) + + set(PLATFORM_INCLUDES "lib/win/directx" "lib/win") + + set(CMAKE_FIND_LIBRARY_PREFIXES "") + 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(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(DDRAW_LIBRARY NAMES ddraw "${CMAKE_SOURCE_DIR}/lib/win" "${CMAKE_SOURCE_DIR}/lib/win/directx") + + 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("/we4305") # truncation from 'X' to 'Y' + add_compile_options("/we4474") # too many arguments passed for format string + add_compile_options("/we4700") # uninitialized local variable 'X' used + 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("/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("/we4715") # 'function' : not all control paths return a value + add_compile_options("/we4834") # discarding return value of function with [[nodiscard]] attribute + endif() +endif() + +include_directories("lib" "Descent3" ${PLATFORM_INCLUDES}) + +# file(GLOB_RECURSE INCS "*.h") + +add_subdirectory(2dlib) +add_subdirectory(AudioEncode) +add_subdirectory(bitmap) +add_subdirectory(cfile) +add_subdirectory(czip) +add_subdirectory(d3music) + +if(WIN32) + add_subdirectory(dd_grwin32) + add_subdirectory(dd_vidwin32) + add_subdirectory(win32) + add_subdirectory(dd_sndlib) + add_subdirectory(ddio_win) +endif() + +if(UNIX) + add_subdirectory(linux) + add_subdirectory(ddvid_lnx) + add_subdirectory(dd_lnxsound) + add_subdirectory(lnxcontroller) + add_subdirectory(ddio_lnx) +endif() + +add_subdirectory(ddio_common) +add_subdirectory(fix) +add_subdirectory(manage) +add_subdirectory(grtext) +add_subdirectory(mem) +add_subdirectory(misc) +add_subdirectory(model) +add_subdirectory(module) +add_subdirectory(movie) +add_subdirectory(music) +add_subdirectory(networking) +add_subdirectory(physics) +add_subdirectory(renderer) +add_subdirectory(rtperformance) +add_subdirectory(sndlib) +add_subdirectory(stream_audio) +add_subdirectory(ui) +add_subdirectory(unzip) +add_subdirectory(vecmat) +add_subdirectory(libmve) +add_subdirectory(md5) +add_subdirectory(libacm) +add_subdirectory(Descent3) + +# 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. +if(UNIX) + add_subdirectory(netgames) + add_subdirectory(netcon) + add_subdirectory(scripts) +endif() + +# set default cmake build type to Debug (None Debug Release RelWithDebInfo MinSizeRel) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") +endif() diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 595bcfbe..81e451f4 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -1,309 +1,307 @@ -set(HEADERS - aiambient.h - AIGoal.h - AIMain.h - aipath.h - aistruct.h - aistruct_external.h - aiterrain.h - ambient.h - args.h - attach.h - audiotaunts.h - bnode.h - BOA.h - Briefing.h - BriefingParse.h - bsp.h - buddymenu.h - buildno.h - cinematics.h - cockpit.h - config.h - ConfigItem.h - controls.h - credits.h - CtlCfgElem.h - ctlconfig.h - ctlconfigtxt.h - D3ForceFeedback.h - d3serial.h - damage.h - damage_external.h - DeathInfo.h - deathinfo_external.h - debuggraph.h - descent.h - difficulty.h - difficulty_external.h - DllWrappers.h - door.h - doorway.h - fireball.h - fireball_external.h - game.h - gamecinematics.h - gamecinematics_external.h - gameevent.h - gamefile.h - gamefont.h - gameloop.h - gamepath.h - gamesave.h - gamesequence.h - gametexture.h - gauges.h - help.h - hotspotmap.h - hud.h - init.h - Inventory.h - levelgoal.h - levelgoal_external.h - lighting.h - lightmap_info.h - list.h - LoadLevel.h - localization.h - marker.h - matcen.h - matcen_external.h - menu.h - Mission.h - mission_download.h - mmItem.h - multi.h - multisafe.h - multi_client.h - multi_dll_mgr.h - multi_external.h - multi_save_settings.h - multi_server.h - multi_ui.h - multi_world_state.h - NewPyroGauges.h - newui.h - newui_core.h - object.h - object_external.h - object_external_struct.h - object_lighting.h - objinfo.h - objinit.h - ObjScript.h - osiris_dll.h - osiris_predefs.h - osiris_share.h - pilot.h - PilotPicsAPI.h - pilot_class.h - player.h - player_external.h - player_external_struct.h - postrender.h - powerup.h - procedurals.h - program.h - render.h - renderobject.h - resource.h - robot.h - robotfire.h - robotfirestruct.h - robotfirestruct_external.h - rocknride.h - room.h - room_external.h - scorch.h - screens.h - ship.h - slew.h - SmallViews.h - soar.h - soar_helpers.h - sounds.h - special_face.h - spew.h - splinter.h - stringtable.h - subtitles.h - TelCom.h - TelComAutoMap.h - TelComCargo.h - TelComEffects.h - TelComEfxStructs.h - TelComGoals.h - terrain.h - trigger.h - vclip.h - vibeinterface.h - viseffect.h - viseffect_external.h - voice.h - weapon.h - weapon_external.h - weather.h) - -set (CPPS - aiambient.cpp - AIGoal.cpp - AImain.cpp - aipath.cpp - aiterrain.cpp - ambient.cpp - args.cpp - attach.cpp - audiotaunts.cpp - bnode.cpp - BOA.cpp - Briefing.cpp - BriefingParse.cpp - bsp.cpp - buddymenu.cpp - cinematics.cpp - cockpit.cpp - config.cpp - ConfigItem.cpp - Controls.cpp - credits.cpp - CtlCfgElem.cpp - ctlconfig.cpp - D3ForceFeedback.cpp - d3serial.cpp - damage.cpp - debuggraph.cpp - dedicated_server.cpp - demofile.cpp - descent.cpp - difficulty.cpp - DllWrappers.cpp - door.cpp - doorway.cpp - fireball.cpp - game.cpp - Game2DLL.cpp - GameCheat.cpp - gamecinematics.cpp - gameevent.cpp - gamefile.cpp - gamefont.cpp - GameLoop.cpp - gamepath.cpp - gamesave.cpp - gamesequence.cpp - gametexture.cpp - gauges.cpp - help.cpp - hotspotmap.cpp - hud.cpp - huddisplay.cpp - hudmessage.cpp - init.cpp - intellivibe.cpp - Inventory.cpp - levelgoal.cpp - lighting.cpp - lightmap_info.cpp - list.cpp - LoadLevel.cpp - loadstate.cpp - localization.cpp - marker.cpp - matcen.cpp - megacell.cpp - menu.cpp - Mission.cpp - mission_download.cpp - mmItem.cpp - multi.cpp - multisafe.cpp - multisafe_server.cpp - multi_client.cpp - multi_connect.cpp - multi_dll_mgr.cpp - multi_save_setting.cpp - multi_server.cpp - multi_ui.cpp - NewPyroGauges.cpp - newui.cpp - newui_core.cpp - newui_filedlg.cpp - object.cpp - object_lighting.cpp - objinfo.cpp - ObjInit.cpp - ObjScript.cpp - OsirisLoadandBind.cpp - osiris_predefs.cpp - pilot.cpp - PilotPicsAPI.cpp - pilot_class.cpp - Player.cpp - postrender.cpp - procedurals.cpp - program.cpp - render.cpp - renderobject.cpp - robotfire.cpp - rocknride.cpp - room.cpp - scorch.cpp - screens.cpp - ship.cpp - SLEW.cpp - SmallViews.cpp - soar.cpp - soar_helpers.cpp - special_face.cpp - spew.cpp - splinter.cpp - subtitles.cpp - TelCom.cpp - TelComAutoMap.cpp - TelComCargo.cpp - TelComEffects.cpp - TelcomEffectsRender.cpp - TelComGoals.cpp - terrain.cpp - terrainrender.cpp - TerrainSearch.cpp - trigger.cpp - vclip.cpp - viseffect.cpp - voice.cpp - weapon.cpp - WeaponFire.cpp - weather.cpp - ) - - -if (WIN32) - set (PLATFORM_LIBS dd_sndlib dd_grwin32 dd_vidwin32 ddio_win win32 wsock32.lib winmm.lib Glu32.lib - ${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY}) - set(PLATFORM_CPPS winmain.cpp ) - 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}) - 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}) - set (PLATFORM_CPPS loki_utils.c lnxmain.cpp SDLMain.m) - set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework Cocoa -framework OpenGL -framework Carbon") -endif() - -file(GLOB_RECURSE INCS "../lib/*.h") - -add_executable(Descent3 ${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS}) -target_link_libraries(Descent3 - 2dlib AudioEncode bitmap cfile czip d3music ddio_common libmve libacm - fix grtext manage mem misc model module movie stream_audio - music networking physics renderer rtperformance sndlib ui unzip vecmat md5 - ${PLATFORM_LIBS}) - -if (WIN32) - set_target_properties(Descent3 PROPERTIES WIN32_EXECUTABLE ON) -endif() +set(HEADERS + aiambient.h + AIGoal.h + AIMain.h + aipath.h + aistruct.h + aistruct_external.h + aiterrain.h + ambient.h + args.h + attach.h + audiotaunts.h + bnode.h + BOA.h + Briefing.h + BriefingParse.h + bsp.h + buddymenu.h + buildno.h + cinematics.h + cockpit.h + config.h + ConfigItem.h + controls.h + credits.h + CtlCfgElem.h + ctlconfig.h + ctlconfigtxt.h + D3ForceFeedback.h + d3serial.h + damage.h + damage_external.h + DeathInfo.h + deathinfo_external.h + debuggraph.h + descent.h + difficulty.h + difficulty_external.h + DllWrappers.h + door.h + doorway.h + fireball.h + fireball_external.h + game.h + gamecinematics.h + gamecinematics_external.h + gameevent.h + gamefile.h + gamefont.h + gameloop.h + gamepath.h + gamesave.h + gamesequence.h + gametexture.h + gauges.h + help.h + hotspotmap.h + hud.h + init.h + Inventory.h + levelgoal.h + levelgoal_external.h + lighting.h + lightmap_info.h + list.h + LoadLevel.h + localization.h + marker.h + matcen.h + matcen_external.h + menu.h + Mission.h + mission_download.h + mmItem.h + multi.h + multisafe.h + multi_client.h + multi_dll_mgr.h + multi_external.h + multi_save_settings.h + multi_server.h + multi_ui.h + multi_world_state.h + NewPyroGauges.h + newui.h + newui_core.h + object.h + object_external.h + object_external_struct.h + object_lighting.h + objinfo.h + objinit.h + ObjScript.h + osiris_dll.h + osiris_predefs.h + osiris_share.h + pilot.h + PilotPicsAPI.h + pilot_class.h + player.h + player_external.h + player_external_struct.h + postrender.h + powerup.h + procedurals.h + program.h + render.h + renderobject.h + resource.h + robot.h + robotfire.h + robotfirestruct.h + robotfirestruct_external.h + rocknride.h + room.h + room_external.h + scorch.h + screens.h + ship.h + slew.h + SmallViews.h + soar.h + soar_helpers.h + sounds.h + special_face.h + spew.h + splinter.h + stringtable.h + subtitles.h + TelCom.h + TelComAutoMap.h + TelComCargo.h + TelComEffects.h + TelComEfxStructs.h + TelComGoals.h + terrain.h + trigger.h + vclip.h + vibeinterface.h + viseffect.h + viseffect_external.h + voice.h + weapon.h + weapon_external.h + weather.h) + +set(CPPS + aiambient.cpp + AIGoal.cpp + AImain.cpp + aipath.cpp + aiterrain.cpp + ambient.cpp + args.cpp + attach.cpp + audiotaunts.cpp + bnode.cpp + BOA.cpp + Briefing.cpp + BriefingParse.cpp + bsp.cpp + buddymenu.cpp + cinematics.cpp + cockpit.cpp + config.cpp + ConfigItem.cpp + Controls.cpp + credits.cpp + CtlCfgElem.cpp + ctlconfig.cpp + D3ForceFeedback.cpp + d3serial.cpp + damage.cpp + debuggraph.cpp + dedicated_server.cpp + demofile.cpp + descent.cpp + difficulty.cpp + DllWrappers.cpp + door.cpp + doorway.cpp + fireball.cpp + game.cpp + Game2DLL.cpp + GameCheat.cpp + gamecinematics.cpp + gameevent.cpp + gamefile.cpp + gamefont.cpp + GameLoop.cpp + gamepath.cpp + gamesave.cpp + gamesequence.cpp + gametexture.cpp + gauges.cpp + help.cpp + hotspotmap.cpp + hud.cpp + huddisplay.cpp + hudmessage.cpp + init.cpp + intellivibe.cpp + Inventory.cpp + levelgoal.cpp + lighting.cpp + lightmap_info.cpp + list.cpp + LoadLevel.cpp + loadstate.cpp + localization.cpp + marker.cpp + matcen.cpp + megacell.cpp + menu.cpp + Mission.cpp + mission_download.cpp + mmItem.cpp + multi.cpp + multisafe.cpp + multisafe_server.cpp + multi_client.cpp + multi_connect.cpp + multi_dll_mgr.cpp + multi_save_setting.cpp + multi_server.cpp + multi_ui.cpp + NewPyroGauges.cpp + newui.cpp + newui_core.cpp + newui_filedlg.cpp + object.cpp + object_lighting.cpp + objinfo.cpp + ObjInit.cpp + ObjScript.cpp + OsirisLoadandBind.cpp + osiris_predefs.cpp + pilot.cpp + PilotPicsAPI.cpp + pilot_class.cpp + Player.cpp + postrender.cpp + procedurals.cpp + program.cpp + render.cpp + renderobject.cpp + robotfire.cpp + rocknride.cpp + room.cpp + scorch.cpp + screens.cpp + ship.cpp + SLEW.cpp + SmallViews.cpp + soar.cpp + soar_helpers.cpp + special_face.cpp + spew.cpp + splinter.cpp + subtitles.cpp + TelCom.cpp + TelComAutoMap.cpp + TelComCargo.cpp + TelComEffects.cpp + TelcomEffectsRender.cpp + TelComGoals.cpp + terrain.cpp + terrainrender.cpp + TerrainSearch.cpp + trigger.cpp + vclip.cpp + viseffect.cpp + voice.cpp + weapon.cpp + WeaponFire.cpp + weather.cpp) + +if(WIN32) + set(PLATFORM_LIBS dd_sndlib dd_grwin32 dd_vidwin32 ddio_win win32 wsock32.lib winmm.lib Glu32.lib + ${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY}) + set(PLATFORM_CPPS winmain.cpp) + 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}) + 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}) + set(PLATFORM_CPPS loki_utils.c lnxmain.cpp SDLMain.m) + set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework Cocoa -framework OpenGL -framework Carbon") +endif() + +file(GLOB_RECURSE INCS "../lib/*.h") + +add_executable(Descent3 ${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS}) +target_link_libraries(Descent3 + 2dlib AudioEncode bitmap cfile czip d3music ddio_common libmve libacm + fix grtext manage mem misc model module movie stream_audio + music networking physics renderer rtperformance sndlib ui unzip vecmat md5 + ${PLATFORM_LIBS}) + +if(WIN32) + set_target_properties(Descent3 PROPERTIES WIN32_EXECUTABLE ON) +endif() diff --git a/acmlib/CMakeLists.txt b/acmlib/CMakeLists.txt index be3b0a06..590033a9 100644 --- a/acmlib/CMakeLists.txt +++ b/acmlib/CMakeLists.txt @@ -1,5 +1,5 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - acmlib.cpp) + acmlib.cpp) -add_library(acmlib STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(acmlib STATIC ${HEADERS} ${CPPS}) diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index 4114033b..8258792f 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -1,10 +1,10 @@ set(HEADERS iff.h) set(CPPS - bitmain.cpp - bumpmap.cpp - iff.cpp - lightmap.cpp - pcx.cpp - tga.cpp) + bitmain.cpp + bumpmap.cpp + iff.cpp + lightmap.cpp + pcx.cpp + tga.cpp) -add_library(bitmap STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(bitmap STATIC ${HEADERS} ${CPPS}) diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 1bfa98cd..704e3f08 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -1,7 +1,7 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - CFILE.cpp - hog.cpp - InfFile.cpp) + CFILE.cpp + hog.cpp + InfFile.cpp) -add_library(cfile STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(cfile STATIC ${HEADERS} ${CPPS}) diff --git a/czip/CMakeLists.txt b/czip/CMakeLists.txt index b5fdb773..a107960b 100644 --- a/czip/CMakeLists.txt +++ b/czip/CMakeLists.txt @@ -1,8 +1,8 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - BitIO.cpp - CZip.cpp - HuffmanAdapt.cpp - HuffmanBasic.cpp) + BitIO.cpp + CZip.cpp + HuffmanAdapt.cpp + HuffmanBasic.cpp) -add_library(czip STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(czip STATIC ${HEADERS} ${CPPS}) diff --git a/d3music/CMakeLists.txt b/d3music/CMakeLists.txt index d8dc6bb3..9e3ccb65 100644 --- a/d3music/CMakeLists.txt +++ b/d3music/CMakeLists.txt @@ -1,5 +1,5 @@ set(HEADERS) set(CPPS - musicapi.cpp) + musicapi.cpp) -add_library(d3music STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(d3music STATIC ${HEADERS} ${CPPS}) diff --git a/dd_grwin32/CMakeLists.txt b/dd_grwin32/CMakeLists.txt index 2d8b891b..64c35069 100644 --- a/dd_grwin32/CMakeLists.txt +++ b/dd_grwin32/CMakeLists.txt @@ -1,11 +1,11 @@ -set(HEADERS - ddgrWin32.h - ddgrWin32DX.h - ddgrWin32GDI.h) +set(HEADERS + ddgrWin32.h + ddgrWin32DX.h + ddgrWin32GDI.h) set(CPPS - ddgrWin32API.cpp - ddgrWin32DX.cpp - ddgrWin32GDI.cpp - ddgrWin32Init.cpp) + ddgrWin32API.cpp + ddgrWin32DX.cpp + ddgrWin32GDI.cpp + ddgrWin32Init.cpp) -add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS}) diff --git a/dd_lnxsound/CMakeLists.txt b/dd_lnxsound/CMakeLists.txt index d08af14b..67c45c17 100644 --- a/dd_lnxsound/CMakeLists.txt +++ b/dd_lnxsound/CMakeLists.txt @@ -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) -add_library(dd_lnxsound STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(dd_lnxsound STATIC ${HEADERS} ${CPPS}) diff --git a/dd_sndlib/CMakeLists.txt b/dd_sndlib/CMakeLists.txt index 934dcfa2..6db7ec36 100644 --- a/dd_sndlib/CMakeLists.txt +++ b/dd_sndlib/CMakeLists.txt @@ -1,18 +1,18 @@ -set(HEADERS - auddev.h - ds3dlib_internal.h - eax.h - eax2.h - ia3dapi.h - Ia3dutil.h - vmanpset.h) +set(HEADERS + auddev.h + ds3dlib_internal.h + eax.h + eax2.h + ia3dapi.h + Ia3dutil.h + vmanpset.h) set(CPPS - aureal3d.cpp - ddsoundload.cpp - Ds3dlib.cpp - dsound3d.cpp - eax.cpp - geometry.cpp - ssl_lib.cpp) + aureal3d.cpp + ddsoundload.cpp + Ds3dlib.cpp + dsound3d.cpp + eax.cpp + geometry.cpp + ssl_lib.cpp) -add_library(dd_sndlib STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(dd_sndlib STATIC ${HEADERS} ${CPPS}) diff --git a/dd_vidwin32/CMakeLists.txt b/dd_vidwin32/CMakeLists.txt index 643e940a..2ad6692a 100644 --- a/dd_vidwin32/CMakeLists.txt +++ b/dd_vidwin32/CMakeLists.txt @@ -1,8 +1,8 @@ -set(HEADERS - ddvidlib.h) +set(HEADERS + ddvidlib.h) set(CPPS - video_win32.cpp - vidWin32FS.cpp - vidWin32Win.cpp) + video_win32.cpp + vidWin32FS.cpp + vidWin32Win.cpp) -add_library(dd_vidwin32 STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(dd_vidwin32 STATIC ${HEADERS} ${CPPS}) diff --git a/ddio_common/CMakeLists.txt b/ddio_common/CMakeLists.txt index a87b0999..60d31b73 100644 --- a/ddio_common/CMakeLists.txt +++ b/ddio_common/CMakeLists.txt @@ -1,5 +1,5 @@ set(HEADERS) set(CPPS - ddio.cpp - key.cpp) -add_library(ddio_common STATIC ${HEADERS} ${CPPS}) \ No newline at end of file + ddio.cpp + key.cpp) +add_library(ddio_common STATIC ${HEADERS} ${CPPS}) diff --git a/ddio_lnx/CMakeLists.txt b/ddio_lnx/CMakeLists.txt index 7caf72b7..8f00107e 100644 --- a/ddio_lnx/CMakeLists.txt +++ b/ddio_lnx/CMakeLists.txt @@ -1,4 +1,15 @@ 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}) \ No newline at end of file +add_library(ddio_lnx STATIC ${HEADERS} ${CPPS}) diff --git a/ddio_win/CMakeLists.txt b/ddio_win/CMakeLists.txt index 116f204c..61e9ca6d 100644 --- a/ddio_win/CMakeLists.txt +++ b/ddio_win/CMakeLists.txt @@ -1,12 +1,12 @@ -set(HEADERS ddio_win.h ) +set(HEADERS ddio_win.h) set(CPPS - serial.cpp - winfile.cpp - winforcefeedback.cpp - winio.cpp - winjoy.cpp - winkey.cpp - winmouse.cpp - wintimer.cpp) + serial.cpp + winfile.cpp + winforcefeedback.cpp + winio.cpp + winjoy.cpp + winkey.cpp + winmouse.cpp + wintimer.cpp) -add_library(ddio_win STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(ddio_win STATIC ${HEADERS} ${CPPS}) diff --git a/ddvid_lnx/CMakeLists.txt b/ddvid_lnx/CMakeLists.txt index d3ed4a72..d28fea76 100644 --- a/ddvid_lnx/CMakeLists.txt +++ b/ddvid_lnx/CMakeLists.txt @@ -2,4 +2,4 @@ set(HEADERS) set(CPPS video_lnx.cpp) -add_library(ddvid_lnx STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(ddvid_lnx STATIC ${HEADERS} ${CPPS}) diff --git a/fix/CMakeLists.txt b/fix/CMakeLists.txt index 48a056c0..8fd1cba2 100644 --- a/fix/CMakeLists.txt +++ b/fix/CMakeLists.txt @@ -1,5 +1,5 @@ -set (HEADERS ) -set (CPPS - fix.cpp) +set(HEADERS) +set(CPPS + fix.cpp) -add_library(fix STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(fix STATIC ${HEADERS} ${CPPS}) diff --git a/grtext/CMakeLists.txt b/grtext/CMakeLists.txt index 864a9509..2235cf59 100644 --- a/grtext/CMakeLists.txt +++ b/grtext/CMakeLists.txt @@ -1,7 +1,7 @@ -set(HEADERS grtextlib.h ) +set(HEADERS grtextlib.h) set(CPPS - grfont.cpp - grtext.cpp - textaux.cpp) + grfont.cpp + grtext.cpp + textaux.cpp) -add_library(grtext STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(grtext STATIC ${HEADERS} ${CPPS}) diff --git a/libacm/CMakeLists.txt b/libacm/CMakeLists.txt index 6e6bd44e..3508cf3f 100644 --- a/libacm/CMakeLists.txt +++ b/libacm/CMakeLists.txt @@ -1,6 +1,6 @@ -set(HEADERS ) -set(CPPS - aencode.cpp - libacm.cpp) - -add_library(libacm STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +set(HEADERS) +set(CPPS + aencode.cpp + libacm.cpp) + +add_library(libacm STATIC ${HEADERS} ${CPPS}) diff --git a/libmve/CMakeLists.txt b/libmve/CMakeLists.txt index 4b740a63..7b92311a 100644 --- a/libmve/CMakeLists.txt +++ b/libmve/CMakeLists.txt @@ -1,18 +1,19 @@ -set(HEADERS mvegfx.h - mvelibi.h - mvelibl.h - platform.h - snd8to16.h - SystemInterfaces.h ) +set(HEADERS + mvegfx.h + mvelibi.h + mvelibl.h + platform.h + snd8to16.h + SystemInterfaces.h) set(CPPS - mveasm.cpp - mvelibl.cpp - platform.cpp) + mveasm.cpp + mvelibl.cpp + platform.cpp) -set(PLATFORM_CPPS ) +set(PLATFORM_CPPS) -if (UNIX) - set (PLATFORM_CPPS "lnxdsound.cpp") +if(UNIX) + set(PLATFORM_CPPS "lnxdsound.cpp") endif() add_library(libmve STATIC ${HEADERS} ${CPPS} ${PLATFORM_CPPS}) diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 6d36a378..460e945f 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,4 +1,4 @@ -set(HEADERS registry.h ) +set(HEADERS registry.h) set(CPPS lnxcon.cpp lnxcon_raw.cpp @@ -9,4 +9,4 @@ set(CPPS lnxmono.cpp registry.cpp) # DynXLib.cpp -add_library(linux STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(linux STATIC ${HEADERS} ${CPPS}) diff --git a/lnxcontroller/CMakeLists.txt b/lnxcontroller/CMakeLists.txt index 8efaf5d4..c306ff02 100644 --- a/lnxcontroller/CMakeLists.txt +++ b/lnxcontroller/CMakeLists.txt @@ -1,6 +1,4 @@ -set (HEADERS ) -set (CPPS - lnxcontroller.cpp -) +set(HEADERS) +set(CPPS lnxcontroller.cpp) -add_library(lnxcontroller STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(lnxcontroller STATIC ${HEADERS} ${CPPS}) diff --git a/lnxmvelib/CMakeLists.txt b/lnxmvelib/CMakeLists.txt index 0a9180c8..1db72ef6 100644 --- a/lnxmvelib/CMakeLists.txt +++ b/lnxmvelib/CMakeLists.txt @@ -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 lnxdraw.cpp lnxdsound.cpp @@ -7,4 +16,4 @@ set(CPPS # asmstub.c -add_library(lnxmvelib STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(lnxmvelib STATIC ${HEADERS} ${CPPS}) diff --git a/manage/CMakeLists.txt b/manage/CMakeLists.txt index 42ea5ceb..36fedf99 100644 --- a/manage/CMakeLists.txt +++ b/manage/CMakeLists.txt @@ -1,23 +1,24 @@ -set(HEADERS doorpage.h - gamefilepage.h - genericpage.h - megapage.h - powerpage.h - robotpage.h - shippage.h - soundpage.h - texpage.h - weaponpage.h ) +set(HEADERS + doorpage.h + gamefilepage.h + genericpage.h + megapage.h + powerpage.h + robotpage.h + shippage.h + soundpage.h + texpage.h + weaponpage.h) set(CPPS - doorpage.cpp - gamefilepage.cpp - generic.cpp - manage.cpp - megapage.cpp - pagelock.cpp - shippage.cpp - soundpage.cpp - texpage.cpp - weaponpage.cpp) + doorpage.cpp + gamefilepage.cpp + generic.cpp + manage.cpp + megapage.cpp + pagelock.cpp + shippage.cpp + soundpage.cpp + texpage.cpp + weaponpage.cpp) -add_library(manage STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(manage STATIC ${HEADERS} ${CPPS}) diff --git a/md5/CMakeLists.txt b/md5/CMakeLists.txt index 3cad9127..c6dfee75 100644 --- a/md5/CMakeLists.txt +++ b/md5/CMakeLists.txt @@ -1,7 +1,7 @@ set(HEADERS md5.h) set(CPPS - md5.cpp) + md5.cpp) -set(PLATFORMCPPS ) +set(PLATFORMCPPS) add_library(md5 STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) diff --git a/mem/CMakeLists.txt b/mem/CMakeLists.txt index a5204a40..c3691404 100644 --- a/mem/CMakeLists.txt +++ b/mem/CMakeLists.txt @@ -1,5 +1,5 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - mem.cpp) + mem.cpp) -add_library(mem STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(mem STATIC ${HEADERS} ${CPPS}) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index 943b1a67..d0d1c17c 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -1,10 +1,10 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - endian.cpp - error.cpp - logfile.cpp - psglob.cpp - psrand.cpp - pstring.cpp) + endian.cpp + error.cpp + logfile.cpp + psglob.cpp + psrand.cpp + pstring.cpp) -add_library(misc STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(misc STATIC ${HEADERS} ${CPPS}) diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 5f2fe9ac..9130aef3 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -1,6 +1,6 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - newstyle.cpp - polymodel.cpp) + newstyle.cpp + polymodel.cpp) -add_library(model STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(model STATIC ${HEADERS} ${CPPS}) diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index 5d44dfd8..3b6a0daa 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -1,5 +1,5 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - module.cpp) + module.cpp) -add_library(module STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(module STATIC ${HEADERS} ${CPPS}) diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index 2568a8f9..4b97cdca 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -1,6 +1,6 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - d3movie.cpp) + d3movie.cpp) add_library(movie STATIC ${HEADERS} ${CPPS}) -target_link_libraries(movie libmve) \ No newline at end of file +target_link_libraries(movie libmve) diff --git a/music/CMakeLists.txt b/music/CMakeLists.txt index 47ee98c2..05b55b55 100644 --- a/music/CMakeLists.txt +++ b/music/CMakeLists.txt @@ -1,8 +1,8 @@ set(HEADERS) set(CPPS - omflex.cpp - sequencer.cpp - streamer.cpp - tracklist.cpp) + omflex.cpp + sequencer.cpp + streamer.cpp + tracklist.cpp) -add_library(music STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(music STATIC ${HEADERS} ${CPPS}) diff --git a/netcon/CMakeLists.txt b/netcon/CMakeLists.txt index f41c7fca..52b11b8c 100644 --- a/netcon/CMakeLists.txt +++ b/netcon/CMakeLists.txt @@ -1,3 +1,3 @@ include_directories("includes") add_subdirectory(inetfile) -add_subdirectory(lanclient) \ No newline at end of file +add_subdirectory(lanclient) diff --git a/netcon/inetfile/CMakeLists.txt b/netcon/inetfile/CMakeLists.txt index 707ba4c2..2e2edb71 100644 --- a/netcon/inetfile/CMakeLists.txt +++ b/netcon/inetfile/CMakeLists.txt @@ -1,9 +1,8 @@ set(HEADERS) -set(CPPS +set(CPPS CFtp.cpp Chttpget.cpp - inetgetfile.cpp -) + inetgetfile.cpp) add_library(inetfile STATIC ${HEADERS} ${CPPS}) diff --git a/netgames/CMakeLists.txt b/netgames/CMakeLists.txt index aec53458..24314c66 100644 --- a/netgames/CMakeLists.txt +++ b/netgames/CMakeLists.txt @@ -8,4 +8,4 @@ add_subdirectory(hoard) add_subdirectory(hyperanarchy) add_subdirectory(monsterball) add_subdirectory(roboanarchy) -add_subdirectory(tanarchy) \ No newline at end of file +add_subdirectory(tanarchy) diff --git a/netgames/dmfc/CMakeLists.txt b/netgames/dmfc/CMakeLists.txt index b71dd674..7f75f372 100644 --- a/netgames/dmfc/CMakeLists.txt +++ b/netgames/dmfc/CMakeLists.txt @@ -1,28 +1,28 @@ -set(HEADERS dmfcdllinit.h +set(HEADERS + dmfcdllinit.h dmfcinputcommands.h dmfcinternal.h - encryption.h -) + encryption.h) -set(CPPS +set(CPPS dmfcbase.cpp dmfccfg.cpp dmfcclient.cpp dmfcfunctions.cpp dmfchudmessages.cpp - dmfcinputcommand.cpp - dmfcmenu.cpp - dmfcpackets.cpp - dmfcpinfo.cpp - dmfcprecord.cpp - dmfcremote.cpp - dmfcserver.cpp - dmfcstats.cpp - dmfctimer.cpp - dmfcui.cpp - dmfcvirtual.cpp - idmfc.cpp - encryption.cpp + dmfcinputcommand.cpp + dmfcmenu.cpp + dmfcpackets.cpp + dmfcpinfo.cpp + dmfcprecord.cpp + dmfcremote.cpp + dmfcserver.cpp + dmfcstats.cpp + dmfctimer.cpp + dmfcui.cpp + dmfcvirtual.cpp + idmfc.cpp + encryption.cpp dmfcinterface.cpp) add_definitions(-DOUTRAGE_VERSION -DDMFC_DLL) diff --git a/netgames/hoard/CMakeLists.txt b/netgames/hoard/CMakeLists.txt index 1c0380f5..60078d3f 100644 --- a/netgames/hoard/CMakeLists.txt +++ b/netgames/hoard/CMakeLists.txt @@ -1,7 +1,7 @@ set(HEADERS hoardaux.h Hoard.h hoardstr.h) set(CPPS hoard.cpp hoard_ui.cpp) -set (NETGAME_MODULE hoard) +set(NETGAME_MODULE hoard) add_library(${NETGAME_MODULE} SHARED ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index b020d92e..10da3f6f 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -1,11 +1,11 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - networking.cpp) + networking.cpp) set(PLATFORMCPPS) if(WIN32) - set(PLATFORMCPPS "directplay.cpp") + set(PLATFORMCPPS "directplay.cpp") endif() -add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) \ No newline at end of file +add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index 69a6f469..181cdc02 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -1,8 +1,8 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - Collide.cpp - FindIntersection.cpp - newstyle_fi.cpp - physics.cpp) + Collide.cpp + FindIntersection.cpp + newstyle_fi.cpp + physics.cpp) -add_library(physics STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(physics STATIC ${HEADERS} ${CPPS}) diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 1a74acd5..f5639707 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -1,29 +1,29 @@ -set(HEADERS - dyna_gl.h - HardwareInternal.h - RendererConfig.h - SoftwareInternal.h) +set(HEADERS + dyna_gl.h + HardwareInternal.h + RendererConfig.h + SoftwareInternal.h) set(CPPS - HardwareClipper.cpp - HardwareDraw.cpp - HardwareGlobalVars.cpp - HardwareInstance.cpp - HardwareOpenGL.cpp - HardwarePoints.cpp - HardwareSetup.cpp - HardwareTransforms.cpp - - SoftwareClipper.cpp - SoftwareDraw.cpp - SoftwareGlobalVars.cpp - SoftwareInstance.cpp - SoftwareOpenGL.cpp - SoftwareOpenGLMeshBuilder.cpp - SoftwarePoints.cpp - SoftwareSetup.cpp) + HardwareClipper.cpp + HardwareDraw.cpp + HardwareGlobalVars.cpp + HardwareInstance.cpp + HardwareOpenGL.cpp + HardwarePoints.cpp + HardwareSetup.cpp + HardwareTransforms.cpp + + SoftwareClipper.cpp + SoftwareDraw.cpp + SoftwareGlobalVars.cpp + SoftwareInstance.cpp + SoftwareOpenGL.cpp + SoftwareOpenGLMeshBuilder.cpp + SoftwarePoints.cpp + SoftwareSetup.cpp) if(UNIX) - set (CPPS ${CPPS} lnxscreenmode.cpp) + set(CPPS ${CPPS} lnxscreenmode.cpp) endif() # These are excluded. @@ -31,4 +31,4 @@ endif() #renderer.cpp #Direct3D.cpp -add_library(renderer STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(renderer STATIC ${HEADERS} ${CPPS}) diff --git a/rtperformance/CMakeLists.txt b/rtperformance/CMakeLists.txt index 2db36b65..52cc2729 100644 --- a/rtperformance/CMakeLists.txt +++ b/rtperformance/CMakeLists.txt @@ -1,5 +1,5 @@ set(HEADERS) set(CPPS - rtperformance.cpp) + rtperformance.cpp) -add_library(rtperformance STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(rtperformance STATIC ${HEADERS} ${CPPS}) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 583f62c0..b4f6d04d 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,86 +1,83 @@ - -add_definitions (-DCHECKSUM=2273873307UL) +add_definitions(-DCHECKSUM=2273873307UL) set(HEADERS) set(CPPS) if(UNIX) - set (CPPS - linux_lib.cpp) + set(CPPS + linux_lib.cpp) endif() set(SCRIPTS - aigame2 - AIGame3 - aigame4 - AIGame - barney - BatteriesIncluded - BossCamera - CanyonsCTF - CellTestLevel - ChrisTest - clutter - GameGauge - generic - Geodomes - HalfPipe - InfernalBolt - Inversion - LEVEL0 - level10 - level11 - Level12 - level13 - level14 - LEVEL15 - Level16 - level17 - level1 - level2 - level3 - level4 - level5 - Level6 - level7 - level8 - Level9 - LevelS1 - levelS2 - Merc02 - Merc1 - Merc3 - Merc4 - merc5 - Merc6 - Merc7 - myPowerHouse - Mysterious_Isle - orbital - Paranoia - PiccuStation - Polaris - Quadsomniac - RudeAwakening - SewerRat - testscript - TrainingMission - Y2K) + aigame2 + AIGame3 + aigame4 + AIGame + barney + BatteriesIncluded + BossCamera + CanyonsCTF + CellTestLevel + ChrisTest + clutter + GameGauge + generic + Geodomes + HalfPipe + InfernalBolt + Inversion + LEVEL0 + level10 + level11 + Level12 + level13 + level14 + LEVEL15 + Level16 + level17 + level1 + level2 + level3 + level4 + level5 + Level6 + level7 + level8 + Level9 + LevelS1 + levelS2 + Merc02 + Merc1 + Merc3 + Merc4 + merc5 + Merc6 + Merc7 + myPowerHouse + Mysterious_Isle + orbital + Paranoia + PiccuStation + Polaris + Quadsomniac + RudeAwakening + SewerRat + testscript + TrainingMission + Y2K) foreach(SCRIPT ${SCRIPTS}) - add_library(${SCRIPT} SHARED ${CPPS} "${SCRIPT}.cpp") - set_target_properties(${SCRIPT} PROPERTIES PREFIX "") - if(UNIX) - add_custom_command( - TARGET ${SCRIPT} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/" - COMMENT "Copying file ${SCRIPT} to hogfile directory..." - ) - add_custom_command( - TARGET ${SCRIPT} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/" - ) - endif() + add_library(${SCRIPT} SHARED ${CPPS} "${SCRIPT}.cpp") + set_target_properties(${SCRIPT} PROPERTIES PREFIX "") + if(UNIX) + add_custom_command( + TARGET ${SCRIPT} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/" + COMMENT "Copying file ${SCRIPT} to hogfile directory...") + add_custom_command( + TARGET ${SCRIPT} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/") + endif() endforeach() if(UNIX AND NOT APPLE) @@ -89,23 +86,21 @@ if(UNIX AND NOT APPLE) add_custom_target("FullLinuxHog" 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 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 remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/" DEPENDS ${SCRIPTS} - COMMENT "Building platform specific hog." - ) + COMMENT "Building platform specific hog.") add_custom_target("DemoLinuxHog" 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 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" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/" DEPENDS ${SCRIPTS} - COMMENT "Building platform specific hog." - ) + COMMENT "Building platform specific hog.") endif() diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index 910b879c..f8ec88b8 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -1,7 +1,7 @@ -set(HEADERS sndrender.h ) +set(HEADERS sndrender.h) set(CPPS - hlsoundlib.cpp - sndrender.cpp - soundload.cpp) + hlsoundlib.cpp + sndrender.cpp + soundload.cpp) -add_library(sndlib STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(sndlib STATIC ${HEADERS} ${CPPS}) diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index 8983f128..ca8ebb47 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -1,7 +1,7 @@ -set(HEADERS ) -set(CPPS - osfarchive.cpp - streamaudio.cpp) - -add_library(stream_audio STATIC ${HEADERS} ${CPPS}) -target_link_libraries(stream_audio libacm) \ No newline at end of file +set(HEADERS) +set(CPPS + osfarchive.cpp + streamaudio.cpp) + +add_library(stream_audio STATIC ${HEADERS} ${CPPS}) +target_link_libraries(stream_audio libacm) diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 0d2707e1..d1797b18 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -1,19 +1,19 @@ set(HEADERS UIlib.h) set(CPPS - UIButton.cpp - UICombo.cpp - UIConsole.cpp - UIDraw.cpp - UIEdit.cpp - UIGadget.cpp - UIGroup.cpp - UIHotspot.cpp - UIListBox.cpp - UIObject.cpp - UIRes.cpp - UISlider.cpp - UIStatic.cpp - UISystem.cpp - UIWindow.cpp) + UIButton.cpp + UICombo.cpp + UIConsole.cpp + UIDraw.cpp + UIEdit.cpp + UIGadget.cpp + UIGroup.cpp + UIHotspot.cpp + UIListBox.cpp + UIObject.cpp + UIRes.cpp + UISlider.cpp + UIStatic.cpp + UISystem.cpp + UIWindow.cpp) -add_library(ui STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(ui STATIC ${HEADERS} ${CPPS}) diff --git a/unzip/CMakeLists.txt b/unzip/CMakeLists.txt index 1f166255..694bfa33 100644 --- a/unzip/CMakeLists.txt +++ b/unzip/CMakeLists.txt @@ -1,21 +1,21 @@ -set(HEADERS infblock.h - infcodes.h - inffast.h - inffixed.h - inftrees.h - infutil.h - zconf.h - zlib.h - zutil.h ) +set(HEADERS + infblock.h + infcodes.h + inffast.h + inffixed.h + inftrees.h + infutil.h + zconf.h + zlib.h + zutil.h) set(CPPS - unzip.cpp - adler32.c - infblock.c - infcodes.c - inffast.c - inflate.c - inftrees.c - infutil.c - ) + unzip.cpp + adler32.c + infblock.c + infcodes.c + inffast.c + inflate.c + inftrees.c + infutil.c) -add_library(unzip STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(unzip STATIC ${HEADERS} ${CPPS}) diff --git a/vecmat/CMakeLists.txt b/vecmat/CMakeLists.txt index e013138a..dd8543b3 100644 --- a/vecmat/CMakeLists.txt +++ b/vecmat/CMakeLists.txt @@ -1,5 +1,5 @@ -set(HEADERS ) +set(HEADERS) set(CPPS - vector.cpp) + vector.cpp) -add_library(vecmat STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(vecmat STATIC ${HEADERS} ${CPPS}) diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index 3506cdcc..7b993853 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -1,11 +1,11 @@ -set(HEADERS win32os.h ) +set(HEADERS win32os.h) set(CPPS - winapp.cpp - wincon.cpp - WinController.cpp - windata.cpp - windebug.cpp - winmono.cpp - wintask.cpp) + winapp.cpp + wincon.cpp + WinController.cpp + windata.cpp + windebug.cpp + winmono.cpp + wintask.cpp) -add_library(win32 STATIC ${HEADERS} ${CPPS}) \ No newline at end of file +add_library(win32 STATIC ${HEADERS} ${CPPS})