32 lines
1014 B
CMake
32 lines
1014 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(gamekdm LANGUAGES C CXX)
|
|
|
|
# 32-bit Windows DLL, built with the pinned i686-w64-mingw32 cross toolchain
|
|
# (see cmake/toolchain-mingw-i686.cmake, toolchain.lock). The real shipping
|
|
# gamekdm.dll's reconstructed source lands in src/* over subsequent tasks;
|
|
# today's target is a minimal stub so the layered tree + build + export
|
|
# table shape is proven before any real logic is reconstructed.
|
|
|
|
add_library(gamekdm SHARED
|
|
src/entry/gamemain.cpp
|
|
)
|
|
|
|
target_include_directories(gamekdm PRIVATE
|
|
${CMAKE_SOURCE_DIR}/include
|
|
)
|
|
|
|
set_target_properties(gamekdm PROPERTIES
|
|
OUTPUT_NAME "gamekdm"
|
|
PREFIX ""
|
|
SUFFIX ".dll"
|
|
)
|
|
|
|
# Link with the hand-authored .def so ONLY gameMain is exported, at ordinal 1,
|
|
# matching the original DLL's export table (no CRT/C++ name-mangled exports).
|
|
target_link_options(gamekdm PRIVATE
|
|
"${CMAKE_SOURCE_DIR}/export/gamekdm.def"
|
|
)
|
|
set_target_properties(gamekdm PROPERTIES
|
|
LINK_DEPENDS "${CMAKE_SOURCE_DIR}/export/gamekdm.def"
|
|
)
|