game-test/CMakeLists.txt

32 lines
1.1 KiB
CMake
Raw Normal View History

2019-09-03 04:07:40 +00:00
cmake_minimum_required(VERSION 3.13)
project(blah)
set(CMAKE_BUILD_TYPE Debug)
include_directories("${PROJECT_SOURCE_DIR}/src/")
#add_executable(test ${PROJECT_SOURCE_DIR}/src/test.cpp)
find_package(PkgConfig REQUIRED)
# OpenGL
find_package(OpenGL REQUIRED)
#find_package(GLEW REQUIRED)
find_package(GLUT REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
# Glad
set(GLAD_API "gl=3.3" CACHE STRING " " FORCE)
add_subdirectory("${PROJECT_SOURCE_DIR}/3rdparty/glad")
# Nuklear
set(NUKLEAR_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/3rdparty/nuklear")
#Client
#target_include_directories(client "${PROJECT_SOURCE_DIR}/src/client")
add_executable(client ${PROJECT_SOURCE_DIR}/src/client/client.cpp)
target_include_directories(client PUBLIC ${GLFW_INCLUDE_DIRS} ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIRS} ${NUKLEAR_INCLUDE_DIR} ${GLAD_INCLUDE_DIRS})
target_link_libraries(client ${GLFW_LIBRARIES} ${GLUT_LIBRARY}
${OPENGL_LIBRARIES} ${GLAD_LIBRARIES} ${CMAKE_DL_LIBS})
# Server
#target_include_directories(server "${PROJECT_SOURCE_DIR}/src/server")
add_executable(server ${PROJECT_SOURCE_DIR}/src/server/server.cpp)