realised im basically just implementing the PGE so ill just use that instead

This commit is contained in:
Ben Kyd
2020-01-17 12:52:36 +00:00
parent 0d0b68540c
commit e509941608
398 changed files with 2933 additions and 219 deletions

View File

@@ -17,62 +17,49 @@ set(include ./include)
add_definitions(-DRESOURCES="${CMAKE_SOURCE_DIR}/resources/")
message(${CMAKE_SOURCE_DIR}/resources)
if (UNIX)
find_package(SDL2 REQUIRED)
endif(UNIX)
if (WIN32)
include_directories(${exe}
"C:/dev/SDL2/include/"
)
endif (WIN32)
file(GLOB src
${src}/*
)
set(THREADS_PREFER_PTHREAD_FLAD ON)
find_package(Threads REQUIRED)
# Find GL and GLX package
find_package(OpenGL REQUIRED)
if (UNIX)
include_directories(${exe}
${SDL2_INCLUDE_DIR}
)
endif (UNIX)
include_directories(${include})
include_directories(${exe}
${include}
)
file(GLOB src
${src}/*
${src}/util/*
${src}/thirdparty/*
)
add_executable(${exe} ${src})
set_target_properties(${exe} PROPERTIES
CXX_STANDARD 17
CXX_EXTENSIONS OFF
)
if (UNIX)
target_link_libraries(${exe}
SDL2
OpenGL::OpenGL
OpenGL::GL
Threads::Threads
)
find_package(X11 REQUIRED)
find_package(PNG REQUIRED)
include_directories(${PNG_INCLUDE_DIR})
endif (UNIX)
if (WIN32)
target_link_libraries(${exe}
${WinSDK}
"C:/dev/SDL2/lib/x64/SDL2.lib"
"C:/dev/SDL2/lib/x64/SDL2main.lib"
"C:/dev/SDL2/lib/x64/SDL2test.lib"
)
include_directories(${WinSDK})
endif (WIN32)
target_link_libraries(${exe}
${CMAKE_DL_LIBS}
add_executable(${exe}
${src}
)
link_libraries(${exe}
Threads::Threads
OpenGL::OpenGL
OpenGL::GL
OpenGL::GLX
)
if (UNIX)
link_libraries(${exe}
${X11_LIBRARIES}
PNG::PNG
)
endif (UNIX)
if (WIN32)
link_libraries(${exe}
${WinSDK}
)
endif (WIN32)

28
CMakeSettings.json Normal file
View File

@@ -0,0 +1,28 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": []
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More