Skip to content

Instantly share code, notes, and snippets.

@thelastpenguin
Created May 30, 2017 06:42
Show Gist options
  • Save thelastpenguin/251bc602624b01403005998e3193a296 to your computer and use it in GitHub Desktop.
Save thelastpenguin/251bc602624b01403005998e3193a296 to your computer and use it in GitHub Desktop.
Polycode CMakeLists.txt - a sample CMake build file for Polycode
cmake_minimum_required(VERSION 2.8)
project(game)
find_package(Threads)
find_package(OpenGL)
find_package(SDL)
set(POLYCODE_DIR /Users/garethgeorge/Desktop/GameDev/Polycode-Framework)
set(POLYCODE_LIBS
${POLYCODE_DIR}/Core/lib/libPolycore.a
${POLYCODE_DIR}/Core/Dependencies/lib/libfreetype.a
${POLYCODE_DIR}/Core/Dependencies/lib/liblibvorbisfile.a
${POLYCODE_DIR}/Core/Dependencies/lib/liblibvorbis.a
${POLYCODE_DIR}/Core/Dependencies/lib/liblibogg.a
# ${POLYCODE_DIR}/Core/Dependencies/lib/libopenal.a
${POLYCODE_DIR}/Core/Dependencies/lib/libphysfs.a
${POLYCODE_DIR}/Core/Dependencies/lib/libpng15.a
${POLYCODE_DIR}/Core/Dependencies/lib/libz.a
${POLYCODE_DIR}/Modules/lib/libPolycode2DPhysics.a
${POLYCODE_DIR}/Modules/Dependencies/lib/libBox2D.a
${POLYCODE_DIR}/Modules/lib/libPolycode3DPhysics.a
${POLYCODE_DIR}/Modules/Dependencies/lib/libBulletDynamics.a
${POLYCODE_DIR}/Modules/Dependencies/lib/libBulletCollision.a
${POLYCODE_DIR}/Modules/Dependencies/lib/libLinearMath.a
# ${POLYCODE_DIR}/Modules/lib/libPolycodeNetworking.a
${CMAKE_THREAD_LIBS_INIT}
# /usr/lib/i386-linux-gnu/librt.so
# /usr/lib/i386-linux-gnu/libdl.so
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${SDL_LIBRARY}
${POLYCODE_DIR}/Core/lib/libPolycore.a
)
set(POLYCODE_INCLUDE ${POLYCODE_DIR}/Core/Dependencies/include
${POLYCODE_DIR}/Core/Dependencies/include/AL
${POLYCODE_DIR}/Core/include
${POLYCODE_DIR}/Modules/include
${POLYCODE_DIR}/Modules/Dependencies/include
${POLYCODE_DIR}/Modules/Dependencies/include/bullet)
include_directories(${POLYCODE_INCLUDE})
add_executable(app main.cpp)
target_link_libraries(app ${POLYCODE_LIBS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment