24 lines
646 B
CMake
24 lines
646 B
CMake
cmake_minimum_required(VERSION 4.1)
|
|
project(BCompat)
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
set(CMAKE_C_FLAGS -m32)
|
|
set(CMAKE_CXX_FLAGS -m32)
|
|
endif ()
|
|
set(CMAKE_SHARED_LINKER_FLAGS -Wl,--kill-at)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
add_executable(bconfig config.c config.rc)
|
|
target_link_libraries(bconfig comctl32)
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
add_library(user32 SHARED user32.c)
|
|
target_link_libraries(user32 -static-libgcc)
|
|
set_target_properties(user32 PROPERTIES PREFIX "")
|
|
|
|
add_library(kernel32 SHARED kernel32.c)
|
|
target_link_libraries(kernel32 -nostdlib)
|
|
set_target_properties(kernel32 PROPERTIES PREFIX "")
|
|
endif ()
|