/
CMakeLists.txt
executable file
·53 lines (45 loc) · 2.41 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
set(PROJECT_NAME a.out)
set(IRRKLANG_DIR irrKlang-64bit-1.5.0/include)
set(FREETYPE_DIR freetype-2.5.5/include)
set(LOCAL_DIR /usr/local/include)
cmake_minimum_required(VERSION 2.8)
project(${PROJECT_NAME})
find_package(OpenGL)
find_package(GLEW REQUIRED)
include_directories(${IRRKLANG_DIR})
include_directories(${FREETYPE_DIR})
include_directories(${LOCAL_DIR})
if(APPLE)
find_library(ASSIMP_LIB assimp)
find_library(GLFW_LIB glfw3)
find_library(COCOA_LIB Cocoa)
find_library(IOKIT_LIB IOKit)
find_library(COREVIDEO_LIB CoreVideo)
find_library(IRRKLANG_LIB irrKlang)
find_library(IRRKLANGMP3_LIB irrKlangMp3)
find_library(FREETYPE_LIB freetype)
find_library(OPENCV_Calib3d OpenCV_calib)
find_library(OPENCV_Core OpenCV_core)
find_library(OPENCV_Features2d OpenCV_features)
find_library(OPENCV_Flann OpenCV_flann)
find_library(OPENCV_Highgui OpenCV_highgui)
find_library(OPENCV_Imgcodecs OpenCV_imgcodecs)
find_library(OPENCV_Imgproc OpenCV_imgproc)
find_library(OPENCV_Ml OpenCV_ml)
find_library(OPENCV_Objdetect OpenCV_objdetect)
find_library(OPENCV_Photo OpenCV_photo)
find_library(OPENCV_Shape OpenCV_shape)
find_library(OPENCV_Stitching OpenCV_stitching)
find_library(OPENCV_Superres OpenCV_superres)
find_library(OPENCV_Video OpenCV_video)
find_library(OPENCV_Videoio OpenCV_videoio)
find_library(OPENCV_Videostab OpenCV_videostab)
find_library(GLUT_LIB glut)
set(GLFW_DEPENDENT_LIBS ${COCOA_LIB} ${IOKIT_LIB} ${COREVIDEO_LIB})
set(PLATFORM_LIBS ${GLFW_DEPENDENT_LIBS})
elseif(WIN32)
set(GLFW_LIB glfw3)
set(PLATFORM_LIBS glew32)
endif()
add_executable(${PROJECT_NAME} Booth.cpp Camera.cpp Clicks.cpp FontAtlas.cpp FontEngine.cpp GLSL.cpp Karaoke.cpp MatrixStack.cpp Minigame.cpp Object.cpp Particle.cpp ParticleTexture.cpp Program.cpp Session.cpp ShootingGallery.cpp Shop.cpp SkyBox.cpp Sound.cpp Texture.cpp tiny_obj_loader.cc WatermelonSmash.cpp Window.cpp World.cpp main.cpp)
target_link_libraries(${PROJECT_NAME} ${ASSIMP_LIB} ${OPENGL_gl_LIBRARY} ${GLFW_LIB} ${GLEW_LIBRARY} ${PLATFORM_LIBS} ${IRRKLANG_LIB} ${IRRKLANGMP3_LIB} ${FREETYPE_LIB} ${OPENCV_Calib3d} ${OPENCV_Core} ${OPENCV_Features2d} ${OPENCV_Flann} ${OPENCV_Highgui} ${OPENCV_Imgcodecs} ${OPENCV_Imgproc} ${OPENCV_Ml} ${OPENCV_Objdetect} ${OPENCV_Objdetect} ${OPENCV_Photo} ${OPENCV_Shape} ${OPENCV_Stitching} ${OPENCV_Superres} ${OPENCV_Video} ${OPENCV_Videoio} ${OPENCV_Videostab} ${GLUT_LIB})