2023-07-16 02:18:21 -04:00
|
|
|
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
2023-06-29 19:39:02 -04:00
|
|
|
|
|
|
|
project(isle CXX)
|
|
|
|
|
|
|
|
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
|
2023-07-16 02:18:21 -04:00
|
|
|
option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC})
|
2023-08-06 15:47:16 -04:00
|
|
|
option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON)
|
2023-06-30 14:34:39 -04:00
|
|
|
|
|
|
|
add_library(lego1 SHARED
|
2024-01-06 21:29:32 -05:00
|
|
|
LEGO1/3dmanager/lego3dmanager.cpp
|
|
|
|
LEGO1/3dmanager/lego3dview.cpp
|
|
|
|
LEGO1/3dmanager/legoview1.cpp
|
|
|
|
LEGO1/3dmanager/tglsurface.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/act1state.cpp
|
|
|
|
LEGO1/act2brick.cpp
|
|
|
|
LEGO1/act2policestation.cpp
|
|
|
|
LEGO1/act3.cpp
|
|
|
|
LEGO1/act3shark.cpp
|
|
|
|
LEGO1/act3state.cpp
|
|
|
|
LEGO1/ambulance.cpp
|
|
|
|
LEGO1/ambulancemissionstate.cpp
|
|
|
|
LEGO1/animstate.cpp
|
|
|
|
LEGO1/beachhouseentity.cpp
|
|
|
|
LEGO1/bike.cpp
|
|
|
|
LEGO1/buildingentity.cpp
|
|
|
|
LEGO1/bumpbouy.cpp
|
|
|
|
LEGO1/carrace.cpp
|
2023-09-27 15:16:46 -04:00
|
|
|
LEGO1/define.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/dllmain.cpp
|
|
|
|
LEGO1/dunebuggy.cpp
|
|
|
|
LEGO1/elevatorbottom.cpp
|
|
|
|
LEGO1/gasstation.cpp
|
|
|
|
LEGO1/gasstationentity.cpp
|
|
|
|
LEGO1/gasstationstate.cpp
|
2023-10-23 07:16:21 -04:00
|
|
|
LEGO1/gifmanager.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/helicopter.cpp
|
|
|
|
LEGO1/helicopterstate.cpp
|
|
|
|
LEGO1/historybook.cpp
|
|
|
|
LEGO1/hospital.cpp
|
|
|
|
LEGO1/hospitalentity.cpp
|
|
|
|
LEGO1/hospitalstate.cpp
|
|
|
|
LEGO1/infocenter.cpp
|
|
|
|
LEGO1/infocenterdoor.cpp
|
|
|
|
LEGO1/infocenterentity.cpp
|
|
|
|
LEGO1/infocenterstate.cpp
|
|
|
|
LEGO1/isle.cpp
|
|
|
|
LEGO1/isleactor.cpp
|
|
|
|
LEGO1/islepathactor.cpp
|
|
|
|
LEGO1/jetski.cpp
|
|
|
|
LEGO1/jetskirace.cpp
|
|
|
|
LEGO1/jukebox.cpp
|
|
|
|
LEGO1/jukeboxentity.cpp
|
|
|
|
LEGO1/jukeboxstate.cpp
|
|
|
|
LEGO1/legoact2state.cpp
|
|
|
|
LEGO1/legoactioncontrolpresenter.cpp
|
2023-08-03 12:54:08 -04:00
|
|
|
LEGO1/legoactor.cpp
|
2023-09-10 08:56:16 -04:00
|
|
|
LEGO1/legoactor.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legoanimactor.cpp
|
|
|
|
LEGO1/legoanimationmanager.cpp
|
|
|
|
LEGO1/legoanimmmpresenter.cpp
|
|
|
|
LEGO1/legoanimpresenter.cpp
|
|
|
|
LEGO1/legobackgroundcolor.cpp
|
2023-06-30 19:33:59 -04:00
|
|
|
LEGO1/legobackgroundcolor.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legobuildingmanager.cpp
|
|
|
|
LEGO1/legocachesound.cpp
|
|
|
|
LEGO1/legocameracontroller.cpp
|
|
|
|
LEGO1/legocarbuild.cpp
|
|
|
|
LEGO1/legocarbuildanimpresenter.cpp
|
|
|
|
LEGO1/legocontrolmanager.cpp
|
|
|
|
LEGO1/legoentity.cpp
|
|
|
|
LEGO1/legoentitypresenter.cpp
|
2023-10-25 16:51:59 -04:00
|
|
|
LEGO1/legoeventnotificationparam.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legoflctexturepresenter.cpp
|
2023-09-29 16:38:08 -04:00
|
|
|
LEGO1/legofullscreenmovie.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legogamestate.cpp
|
|
|
|
LEGO1/legohideanimpresenter.cpp
|
|
|
|
LEGO1/legoinputmanager.cpp
|
|
|
|
LEGO1/legojetski.cpp
|
|
|
|
LEGO1/legoloadcachesoundpresenter.cpp
|
|
|
|
LEGO1/legolocomotionanimpresenter.cpp
|
2023-10-14 09:08:51 -04:00
|
|
|
LEGO1/legometerpresenter.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legomodelpresenter.cpp
|
|
|
|
LEGO1/legonavcontroller.cpp
|
2023-10-12 12:18:24 -04:00
|
|
|
LEGO1/legoobjectfactory.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legoomni.cpp
|
|
|
|
LEGO1/legopalettepresenter.cpp
|
|
|
|
LEGO1/legopartpresenter.cpp
|
|
|
|
LEGO1/legopathactor.cpp
|
|
|
|
LEGO1/legopathcontroller.cpp
|
|
|
|
LEGO1/legopathpresenter.cpp
|
|
|
|
LEGO1/legophonemepresenter.cpp
|
|
|
|
LEGO1/legoplantmanager.cpp
|
|
|
|
LEGO1/legorace.cpp
|
|
|
|
LEGO1/legoroi.cpp
|
|
|
|
LEGO1/legosoundmanager.cpp
|
|
|
|
LEGO1/legostate.cpp
|
2023-07-07 12:20:51 -04:00
|
|
|
LEGO1/legostream.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legotexturepresenter.cpp
|
2023-06-30 19:33:59 -04:00
|
|
|
LEGO1/legoutil.cpp
|
2023-10-12 12:18:24 -04:00
|
|
|
LEGO1/legounksavedatawriter.cpp
|
2023-10-16 09:22:21 -04:00
|
|
|
LEGO1/legovehiclebuildstate.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/legovideomanager.cpp
|
|
|
|
LEGO1/legoworld.cpp
|
|
|
|
LEGO1/legoworldpresenter.cpp
|
|
|
|
LEGO1/motorcycle.cpp
|
2023-10-10 13:05:04 -04:00
|
|
|
LEGO1/mxactionnotificationparam.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxatomid.cpp
|
2023-08-16 13:09:44 -04:00
|
|
|
LEGO1/mxatomidcounter.cpp
|
2023-09-19 10:42:39 -04:00
|
|
|
LEGO1/mxaudiomanager.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxaudiopresenter.cpp
|
|
|
|
LEGO1/mxautolocker.cpp
|
|
|
|
LEGO1/mxbackgroundaudiomanager.cpp
|
|
|
|
LEGO1/mxbitmap.cpp
|
|
|
|
LEGO1/mxcompositemediapresenter.cpp
|
|
|
|
LEGO1/mxcompositepresenter.cpp
|
|
|
|
LEGO1/mxcontrolpresenter.cpp
|
|
|
|
LEGO1/mxcore.cpp
|
|
|
|
LEGO1/mxcriticalsection.cpp
|
2024-01-07 12:07:22 -05:00
|
|
|
LEGO1/mxdirectx/mxdirect3d.cpp
|
|
|
|
LEGO1/mxdirectx/mxdirectdraw.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxdiskstreamcontroller.cpp
|
|
|
|
LEGO1/mxdiskstreamprovider.cpp
|
2023-08-03 14:13:27 -04:00
|
|
|
LEGO1/mxdisplaysurface.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxdsaction.cpp
|
|
|
|
LEGO1/mxdsanim.cpp
|
2023-09-25 22:30:56 -04:00
|
|
|
LEGO1/mxdsbuffer.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxdschunk.cpp
|
|
|
|
LEGO1/mxdsevent.cpp
|
|
|
|
LEGO1/mxdsfile.cpp
|
|
|
|
LEGO1/mxdsmediaaction.cpp
|
|
|
|
LEGO1/mxdsmultiaction.cpp
|
|
|
|
LEGO1/mxdsobject.cpp
|
|
|
|
LEGO1/mxdsobjectaction.cpp
|
|
|
|
LEGO1/mxdsparallelaction.cpp
|
|
|
|
LEGO1/mxdsselectaction.cpp
|
|
|
|
LEGO1/mxdsserialaction.cpp
|
|
|
|
LEGO1/mxdssound.cpp
|
|
|
|
LEGO1/mxdssource.cpp
|
|
|
|
LEGO1/mxdsstill.cpp
|
2023-09-10 08:56:16 -04:00
|
|
|
LEGO1/mxdsstreamingaction.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxdssubscriber.cpp
|
|
|
|
LEGO1/mxentity.cpp
|
|
|
|
LEGO1/mxeventmanager.cpp
|
|
|
|
LEGO1/mxeventpresenter.cpp
|
|
|
|
LEGO1/mxflcpresenter.cpp
|
|
|
|
LEGO1/mxioinfo.cpp
|
|
|
|
LEGO1/mxloopingflcpresenter.cpp
|
2023-07-02 03:00:28 -04:00
|
|
|
LEGO1/mxloopingmidipresenter.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxloopingsmkpresenter.cpp
|
2023-08-28 06:01:45 -04:00
|
|
|
LEGO1/mxmediamanager.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxmediapresenter.cpp
|
2023-07-02 03:00:28 -04:00
|
|
|
LEGO1/mxmidipresenter.cpp
|
2023-10-07 11:02:12 -04:00
|
|
|
LEGO1/mxmusicmanager.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxmusicpresenter.cpp
|
|
|
|
LEGO1/mxnotificationmanager.cpp
|
2023-10-10 13:05:04 -04:00
|
|
|
LEGO1/mxnotificationparam.cpp
|
2023-07-02 03:00:28 -04:00
|
|
|
LEGO1/mxobjectfactory.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxomni.cpp
|
|
|
|
LEGO1/mxomnicreateflags.cpp
|
|
|
|
LEGO1/mxomnicreateparam.cpp
|
|
|
|
LEGO1/mxpalette.cpp
|
2023-07-16 02:43:08 -04:00
|
|
|
LEGO1/mxparam.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxpresenter.cpp
|
2023-09-25 22:30:56 -04:00
|
|
|
LEGO1/mxramstreamcontroller.cpp
|
2023-10-08 16:41:34 -04:00
|
|
|
LEGO1/mxramstreamprovider.cpp
|
2023-10-14 15:33:11 -04:00
|
|
|
LEGO1/mxregion.cpp
|
2023-12-28 23:37:21 -05:00
|
|
|
LEGO1/mxregioncursor.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxscheduler.cpp
|
2023-07-07 14:00:48 -04:00
|
|
|
LEGO1/mxsemaphore.cpp
|
2023-12-20 20:07:48 -05:00
|
|
|
LEGO1/mxsmack.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxsmkpresenter.cpp
|
|
|
|
LEGO1/mxsoundmanager.cpp
|
|
|
|
LEGO1/mxsoundpresenter.cpp
|
|
|
|
LEGO1/mxstillpresenter.cpp
|
2023-12-17 12:24:39 -05:00
|
|
|
LEGO1/mxstreamchunk.cpp
|
2023-09-25 22:30:56 -04:00
|
|
|
LEGO1/mxstreamcontroller.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxstreamer.cpp
|
2023-11-28 08:26:39 -05:00
|
|
|
LEGO1/mxstreamlist.cpp
|
2023-10-08 16:41:34 -04:00
|
|
|
LEGO1/mxstreamprovider.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxstring.cpp
|
2023-07-07 14:00:48 -04:00
|
|
|
LEGO1/mxthread.cpp
|
2023-08-03 14:19:05 -04:00
|
|
|
LEGO1/mxticklemanager.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxtimer.cpp
|
|
|
|
LEGO1/mxtransitionmanager.cpp
|
2023-10-23 07:16:21 -04:00
|
|
|
LEGO1/mxtype17notificationparam.cpp
|
2024-01-01 19:17:38 -05:00
|
|
|
LEGO1/mxunknown100d7c88.cpp
|
2023-08-03 20:13:41 -04:00
|
|
|
LEGO1/mxvariable.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/mxvariabletable.cpp
|
|
|
|
LEGO1/mxvideomanager.cpp
|
|
|
|
LEGO1/mxvideoparam.cpp
|
|
|
|
LEGO1/mxvideoparamflags.cpp
|
|
|
|
LEGO1/mxvideopresenter.cpp
|
|
|
|
LEGO1/mxwavepresenter.cpp
|
|
|
|
LEGO1/pizza.cpp
|
|
|
|
LEGO1/pizzamissionstate.cpp
|
|
|
|
LEGO1/pizzeria.cpp
|
|
|
|
LEGO1/pizzeriastate.cpp
|
|
|
|
LEGO1/police.cpp
|
|
|
|
LEGO1/policeentity.cpp
|
|
|
|
LEGO1/policestate.cpp
|
|
|
|
LEGO1/racecar.cpp
|
|
|
|
LEGO1/racestandsentity.cpp
|
|
|
|
LEGO1/racestate.cpp
|
|
|
|
LEGO1/radio.cpp
|
|
|
|
LEGO1/radiostate.cpp
|
2023-11-19 09:38:07 -05:00
|
|
|
LEGO1/realtime/matrix.cpp
|
|
|
|
LEGO1/realtime/orientableroi.cpp
|
2023-10-24 08:27:24 -04:00
|
|
|
LEGO1/realtime/realtime.cpp
|
|
|
|
LEGO1/realtime/realtimeview.cpp
|
2023-11-19 09:38:07 -05:00
|
|
|
LEGO1/realtime/vector.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/registrationbook.cpp
|
2024-01-06 12:56:15 -05:00
|
|
|
LEGO1/res/lego1.rc
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/score.cpp
|
|
|
|
LEGO1/scorestate.cpp
|
|
|
|
LEGO1/skateboard.cpp
|
2023-12-07 07:10:42 -05:00
|
|
|
LEGO1/tgl/d3drm/camera.cpp
|
|
|
|
LEGO1/tgl/d3drm/device.cpp
|
|
|
|
LEGO1/tgl/d3drm/group.cpp
|
|
|
|
LEGO1/tgl/d3drm/light.cpp
|
|
|
|
LEGO1/tgl/d3drm/mesh.cpp
|
|
|
|
LEGO1/tgl/d3drm/renderer.cpp
|
|
|
|
LEGO1/tgl/d3drm/texture.cpp
|
|
|
|
LEGO1/tgl/d3drm/unk.cpp
|
|
|
|
LEGO1/tgl/d3drm/view.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
LEGO1/towtrack.cpp
|
|
|
|
LEGO1/towtrackmissionstate.cpp
|
2024-01-01 19:17:38 -05:00
|
|
|
LEGO1/viewmanager/viewlodlist.cpp
|
2023-11-19 09:38:07 -05:00
|
|
|
LEGO1/viewmanager/viewmanager.cpp
|
|
|
|
LEGO1/viewmanager/viewroi.cpp
|
2023-06-30 14:34:39 -04:00
|
|
|
)
|
2023-10-24 19:24:29 -04:00
|
|
|
if (MINGW)
|
|
|
|
target_compile_definitions(lego1 PRIVATE DIRECTINPUT_VERSION=0x0500)
|
|
|
|
endif()
|
2023-06-30 14:34:39 -04:00
|
|
|
|
2023-10-27 13:00:20 -04:00
|
|
|
# Additional include directories
|
2023-12-11 16:33:46 -05:00
|
|
|
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/util")
|
2023-11-19 09:38:07 -05:00
|
|
|
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/3rdparty/vec")
|
2023-11-29 07:35:32 -05:00
|
|
|
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/flic")
|
2023-12-20 20:07:48 -05:00
|
|
|
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smack")
|
2023-10-24 08:27:24 -04:00
|
|
|
|
2023-07-16 02:18:21 -04:00
|
|
|
if (ISLE_USE_SMARTHEAP)
|
|
|
|
add_library(SmartHeap::SmartHeap STATIC IMPORTED)
|
|
|
|
set_target_properties(SmartHeap::SmartHeap PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SHLW32MT.LIB"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/smartheap"
|
|
|
|
INTERFACE_COMPILE_OPTIONS "/FI${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SMRTHEAP.HPP")
|
|
|
|
|
|
|
|
target_link_libraries(lego1 PRIVATE SmartHeap::SmartHeap)
|
|
|
|
endif()
|
|
|
|
|
2023-08-06 15:47:16 -04:00
|
|
|
# Use internal DirectX 5 if required
|
|
|
|
if (ISLE_USE_DX5)
|
|
|
|
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc")
|
|
|
|
target_link_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
|
|
|
endif()
|
|
|
|
|
2023-12-20 20:07:48 -05:00
|
|
|
target_link_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smack")
|
|
|
|
|
2023-06-30 14:34:39 -04:00
|
|
|
# Link libraries
|
2024-01-06 12:56:15 -05:00
|
|
|
target_link_libraries(lego1 PRIVATE ddraw dsound dinput dxguid winmm d3drm smack)
|
2023-06-30 14:34:39 -04:00
|
|
|
|
|
|
|
# Make sure filenames are ALL CAPS
|
|
|
|
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
|
2024-01-06 12:56:15 -05:00
|
|
|
set_property(TARGET lego1 PROPERTY PREFIX "")
|
2023-06-30 14:34:39 -04:00
|
|
|
set_property(TARGET lego1 PROPERTY SUFFIX ".DLL")
|
2023-06-29 19:39:02 -04:00
|
|
|
|
|
|
|
if (ISLE_BUILD_APP)
|
|
|
|
add_executable(isle WIN32
|
|
|
|
ISLE/res/isle.rc
|
|
|
|
ISLE/isleapp.cpp
|
|
|
|
ISLE/define.cpp
|
|
|
|
)
|
|
|
|
|
2023-12-11 16:33:46 -05:00
|
|
|
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/util")
|
|
|
|
|
2023-06-29 19:39:02 -04:00
|
|
|
# Include LEGO1 headers in ISLE
|
|
|
|
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
|
|
|
|
|
2023-08-06 15:47:16 -04:00
|
|
|
# Use internal DirectX 5 if required
|
|
|
|
if (ISLE_USE_DX5)
|
|
|
|
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc")
|
|
|
|
target_link_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
|
|
|
endif()
|
|
|
|
|
2023-07-16 02:18:21 -04:00
|
|
|
if (ISLE_USE_SMARTHEAP)
|
|
|
|
target_link_libraries(isle PRIVATE SmartHeap::SmartHeap)
|
|
|
|
endif()
|
|
|
|
|
2023-06-30 14:34:39 -04:00
|
|
|
# Link DSOUND, WINMM, and LEGO1
|
|
|
|
target_link_libraries(isle PRIVATE dsound winmm lego1)
|
2023-06-29 19:39:02 -04:00
|
|
|
|
|
|
|
# Make sure filenames are ALL CAPS
|
|
|
|
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
|
|
|
|
set_property(TARGET isle PROPERTY SUFFIX ".EXE")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# These flags have been taken from the defaults for a Visual C++ 4.20 project (the compiler the
|
|
|
|
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
|
|
|
|
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
|
2023-12-08 06:37:44 -05:00
|
|
|
if (ISLE_BUILD_APP)
|
2023-12-28 16:10:57 -05:00
|
|
|
target_compile_options(isle PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
2023-12-08 06:37:44 -05:00
|
|
|
endif()
|
2023-06-29 19:39:02 -04:00
|
|
|
target_compile_options(lego1 PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Zi /Od /D \"_DEBUG\"")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /D \"NDEBUG\"")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /D \"NDEBUG\"")
|
|
|
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "/Os /D \"NDEBUG\"")
|
|
|
|
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "/machine:I386")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/incremental:no")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/incremental:no")
|
|
|
|
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "/machine:I386")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/incremental:no")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "/incremental:no")
|
2024-01-07 17:31:31 -05:00
|
|
|
|
|
|
|
# Older MSVC versions don't support building in parallel.
|
|
|
|
# Force non-parallel builds of isle and lego1 by putting them in a pool with 1 available job.
|
|
|
|
if(CMAKE_CXX_COMPILER_ID VERSION_LESS 12)
|
|
|
|
set_property(GLOBAL PROPERTY JOB_POOLS "msvc_lego=1;msvc_lego1=1")
|
|
|
|
set_property(TARGET isle PROPERTY JOB_POOL_COMPILE msvc_lego)
|
|
|
|
set_property(TARGET isle PROPERTY JOB_POOL_LINK msvc_lego)
|
|
|
|
set_property(TARGET lego1 PROPERTY JOB_POOL_COMPILE msvc_lego1)
|
|
|
|
set_property(TARGET lego1 PROPERTY JOB_POOL_LINK msvc_lego1)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_program(CLANGFORMAT_BIN NAMES clang-format)
|
|
|
|
if(EXISTS "${CLANGFORMAT_BIN}")
|
|
|
|
execute_process(COMMAND "${CLANGFORMAT_BIN}" --version
|
|
|
|
OUTPUT_VARIABLE "CLANGFORMAT_VERSION_OUTPUT"
|
|
|
|
RESULT_VARIABLE "CLANGFORMAT_RESULT"
|
|
|
|
)
|
|
|
|
if(CLANGFORMAT_RESULT EQUAL 0 AND CLANGFORMAT_VERSION_OUTPUT MATCHES "version ([0-9\\.]+)")
|
|
|
|
set(CLANGFORMAT_VERSION "${CMAKE_MATCH_1}")
|
|
|
|
set(CLANGFORMAT_VERSION_REQUIRED "17.0")
|
|
|
|
message(DEBUG "Found clang-format version ${CLANGFORMAT_VERSION} (needs ${CLANGFORMAT_VERSION_REQUIRED}")
|
|
|
|
if(CLANGFORMAT_VERSION VERSION_GREATER_EQUAL "${CLANGFORMAT_VERSION_REQUIRED}")
|
|
|
|
file(GLOB_RECURSE isle_sources
|
|
|
|
"${PROJECT_SOURCE_DIR}/ISLE/*.cpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/ISLE/*.h"
|
|
|
|
"${PROJECT_SOURCE_DIR}/LEGO1/*.cpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/LEGO1/*.h"
|
|
|
|
)
|
|
|
|
string(REPLACE ";" "\n" isle_sources_lines "${isle_sources}")
|
|
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/isle_sources.txt" "${isle_sources_lines}\n")
|
|
|
|
add_custom_target(clang-format ${CLANGFORMAT_BIN} -i "--files=${CMAKE_CURRENT_BINARY_DIR}/isle_sources.txt")
|
|
|
|
endif()
|
|
|
|
endif()
|
2023-10-05 16:06:11 -04:00
|
|
|
endif()
|