init
This commit is contained in:
commit
f698a38c7e
585 changed files with 118338 additions and 0 deletions
46
SimpleGame/src/CMakeLists.txt
Normal file
46
SimpleGame/src/CMakeLists.txt
Normal file
|
@ -0,0 +1,46 @@
|
|||
cmake_minimum_required(VERSION 3.26)
|
||||
project(simpleGame)
|
||||
|
||||
if(WIN32)
|
||||
message(STATUS "Platform: Windows")
|
||||
set(FMOD_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../fmodwindow")
|
||||
set(CPU_THING "x64")
|
||||
set(FMOD_LIB_NAME "fmod_vc")
|
||||
set(FMOD_DLL_NAME "fmod.dll")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(STATUS "Platform: Linux")
|
||||
set(FMOD_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../fmodstudioapi20307linux")
|
||||
set(CPU_THING "x86_64")
|
||||
set(FMOD_LIB_NAME "fmod")
|
||||
set(FMOD_DLL_NAME "libfmod.so")
|
||||
else()
|
||||
message(FATAL_ERROR "Platform not supported, please update the CMake script.")
|
||||
endif()
|
||||
|
||||
add_executable(simpleGame
|
||||
Source/Game.cpp Include/Game.hpp Source/Main.cpp
|
||||
Source/RoundTarget.cpp Include/RoundTarget.hpp
|
||||
Source/AudioEmitter.cpp Include/AudioEmitter.hpp
|
||||
)
|
||||
|
||||
target_include_directories(simpleGame PRIVATE
|
||||
"Include"
|
||||
"${FMOD_PATH}/api/core/inc"
|
||||
)
|
||||
|
||||
target_link_directories(simpleGame PRIVATE
|
||||
"${FMOD_PATH}/api/core/lib/${CPU_THING}"
|
||||
)
|
||||
|
||||
target_link_libraries(simpleGame PUBLIC
|
||||
sfml-graphics
|
||||
${FMOD_LIB_NAME}
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/../media" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
add_custom_command(TARGET simpleGame POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${FMOD_PATH}/api/core/lib/${CPU_THING}/${FMOD_DLL_NAME}"
|
||||
"$<TARGET_FILE_DIR:simpleGame>"
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue