segatools-configurator/CMakeLists.txt

57 lines
1.5 KiB
CMake
Raw Normal View History

2024-04-14 12:32:49 +02:00
cmake_minimum_required(VERSION 3.27)
project(segatools_configurator)
set(CMAKE_CXX_STANDARD 20)
include(cmake/CPM.cmake)
CPMAddPackage(
NAME imgui
GITHUB_REPOSITORY ocornut/imgui
GIT_TAG 231cbee0fc4f59dbe5b8b853a11b08dc84e57c65
DOWNLOAD_ONLY YES
)
if (imgui_ADDED)
# imgui has no CMake support, so we create our own target
FILE(GLOB imgui_sources ${imgui_SOURCE_DIR}/*.cpp)
FILE(GLOB imgui_sources_cpp ${imgui_SOURCE_DIR}/misc/cpp/*.cpp)
set(IMGUI_DIR ${imgui_SOURCE_DIR})
set(IMGUI_INCLUDE_DIR ${imgui_SOURCE_DIR})
include_directories(${imgui_SOURCE_DIR})
set(IMGUI_SOURCES ${imgui_sources} ${imgui_sources_cpp} ${imgui_SOURCE_DIR}/backends/imgui_impl_dx9.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_win32.cpp)
endif()
include_directories(${IMGUI_INCLUDE_DIR})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")
add_executable(segatools_configurator WIN32 main.cpp ${IMGUI_SOURCES}
extensions/imgui.cpp
extensions/imgui.h
option.cpp
option.h
configurator.cpp
configurator.h
games/io.cpp
games/io.h
button.cpp
button.h
games/chusan/io.cpp
games/chusan/io.h
games/chuni/io.cpp
games/chuni/io.h
games/mai2/io.cpp
games/mai2/io.h
games/mu3/io.h
games/mu3/io.cpp
games/mercury/io.h
games/mercury/io.cpp
)
target_link_libraries(segatools_configurator PRIVATE d3d9 d3dx9 dwmapi)