Commit bc86a819 authored by Jerry's avatar Jerry
Browse files

some cmake script fixes for linux

parent 0edc8b64
......@@ -8,12 +8,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -stdlib=libc++")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -pedantic")
#define symbols for debug build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DDEBUG)
if(NOT WIN32)
add_definitions(-DSTACKTRACE)
endif()
endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DDEBUG)
if (NOT WIN32)
add_definitions(-DSTACKTRACE)
endif ()
endif ()
#define symbols for project
add_definitions(-DGLM_SWIZZLE)
......@@ -21,31 +21,33 @@ add_definitions(-DGLEW_STATIC)
find_package(OpenGL)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/gli"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glm"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2_mixer/x86_64-w64-mingw32/include/SDL2"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/gli"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glm"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2_mixer/x86_64-w64-mingw32/include/SDL2"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
FILE (GLOB_RECURSE clion_all_headers
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/*.h
${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp
${CMAKE_CURRENT_SOURCE_DIR}/*.inl
FILE(GLOB_RECURSE clion_all_headers
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/*.h
${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp
${CMAKE_CURRENT_SOURCE_DIR}/*.inl
)
#glew library
add_library(glew_static STATIC IMPORTED)
set_target_properties(glew_static PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/build/libGLEW.a
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/build/libGLEW.a
)
set(LINKED_LIBRARIES
"SDL2"
"SDL2main"
"SDL2_mixer"
"GL"
SDL2
SDL2main
SDL2_mixer
GL
c++
c++abi
)
add_executable(Game ${clion_all_headers})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment