-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
64 lines (44 loc) · 1.51 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
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 2.8)
project(AntTweakBar)
include(FindOpenGL)
include(FindSDL)
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
# Project includes
set(ATB_INCLUDE_DIR include)
# Standard Packages
find_package(OpenGL REQUIRED)
find_package(GLUT)
find_library(GLFW_LIBRARY glfw)
include_directories( ${ATB_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR})
if(APPLE)
include_directories ( /System/Library/Frameworks )
find_library(APPKIT_LIBRARY AppKit)
message("Appkit: ${APPKIT_LIBRARY}")
set(EXTRA_LIBS ${APPKIT_LIBRARY})
set(CMAKE_CXX_FLAGS "-g -Wall -ObjC++ -fPIC -fno-strict-aliasing -D__PLACEMENT_NEW_INLINE")
add_definitions(-D_MACOSX)
endif(APPLE)
set( SOURCES src/LoadOGL.cpp
src/TwColors.cpp
src/TwMgr.cpp
src/TwPrecomp.cpp
src/TwEventSFML.cpp
src/TwOpenGL.cpp
src/TwBar.cpp
src/TwFonts.cpp
src/TwEventGLUT.c
src/TwEventGLFW.c
#src/TwEventSDL.c
#src/TwEventSDL12.c
#src/TwEventSDL13.c
)
add_library(AntTweakBar SHARED ${SOURCES})
message("Extra libs: ${EXTRA_LIBS}")
target_link_libraries(AntTweakBar ${GLUT_LIBRARY}
${OPENGL_LIBRARY}
${EXTRA_LIBS})
install(TARGETS AntTweakBar LIBRARY DESTINATION lib)
#add_subdirectory(examples)