Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Add CMakeLists.txt #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.0)
project("rawgl")
add_executable(rawgl2
aifcplayer.cpp engine.h graphics_soft.cpp pak.cpp resource_3do.h resource_win31.cpp screenshot.h staticres.cpp util.cpp
aifcplayer.h file.cpp intern.h pak.h resource_mac.cpp resource_win31.h script.cpp systemstub.h util.h
bitmap.cpp file.h main.cpp resource.cpp resource_mac.h scaler.cpp script.h systemstub_sdl.cpp video.cpp
bitmap.h graphics.h mixer.cpp resource.h resource_nth.cpp scaler.h sfxplayer.cpp unpack.cpp video.h
engine.cpp graphics_gl.cpp mixer.h resource_3do.cpp resource_nth.h screenshot.cpp sfxplayer.h unpack.h
)

target_compile_options(rawgl2 PRIVATE -g -O -MMD -Wall -Wpedantic -DBYPASS_PROTECTION -DUSE_GL)
set_property(TARGET rawgl2 PROPERTY CXX_STANDARD 11)

include(FindPkgConfig)

pkg_search_module(SDL2 REQUIRED IMPORTED_TARGET sdl2)
pkg_search_module(SDL2MIXER REQUIRED IMPORTED_TARGET SDL2_mixer)

find_library(GL OpenGL)
find_library(ZLIB z)

target_include_directories(rawgl2 PUBLIC PkgConfig::SDL2)
target_link_libraries(rawgl2 PkgConfig::SDL2 PkgConfig::SDL2MIXER ${GL} ${ZLIB})