Imported Upstream version 2.81
[platform/upstream/libbullet.git] / Extras / glui / CMakeLists.txt
1 # This is basically the overall name of the project in Visual Studio this is the name of the Solution File
2
3 ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS)
4
5 # For every executable you have with a main method you should have an add_executable line below.
6 # For every add executable line you should list every .cpp and .h file you have associated with that executable.  
7
8
9 # This is the variable for Windows.  I use this to define the root of my directory structure.
10 SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/glut)
11
12 # You shouldn't have to modify anything below this line 
13 ########################################################
14
15
16 # This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
17 # This should be the case.
18 INCLUDE (${CMAKE_ROOT}/Modules/FindGLU.cmake)
19 INCLUDE (${CMAKE_ROOT}/Modules/FindGLUT.cmake) 
20 INCLUDE (${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
21
22
23 IF (WIN32)
24   # This is the Windows code for which Opengl, and Glut are not properly installed
25   # since I can't install them I must cheat and copy libraries around
26   INCLUDE_DIRECTORIES(${GLUT_ROOT}) 
27  # LINK_DIRECTORIES(${GLUT_ROOT}\\lib)
28  # IF (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
29  #   LINK_LIBRARIES(${GLUT_ROOT}\\lib\\glut32 ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
30  #   TARGET_LINK_LIBRARIES(table ${GLUT_ROOT}\\lib\\glut32)
31 #
32 #    ADD_CUSTOM_COMMAND(TARGET table POST_BUILD COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2005\\Debug
33 #                        COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2003\\Debug 
34 #            COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs6\\Debug)
35 #  ELSE (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
36 #    LINK_LIBRARIES(${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) 
37 #    TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY})
38 #  ENDIF(${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
39 #  TARGET_LINK_LIBRARIES(table ${OPENGL_gl_LIBRARY})
40 #  TARGET_LINK_LIBRARIES(table ${OPENGL_glu_LIBRARY}) 
41 ELSE (WIN32)
42   # This is the lines for linux.  This should always work if everything is installed and working fine.
43 #  SET(CMAKE_BUILD_TYPE Debug)
44 #  SET(CMAKE_CXX_FLAGS_DEBUG "-g")
45   INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR}) 
46 #  TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
47 #  TARGET_LINK_LIBRARIES(checker ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
48 ENDIF (WIN32)
49
50 INCLUDE_DIRECTORIES(
51 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/glui  
52 )
53
54 ADD_LIBRARY(GLUI
55         arcball.h                       glui_checkbox.cpp               glui_internal.h                 glui_panel.cpp                  glui_spinner.cpp                glui_treepanel.cpp
56 GL                              glui.cpp                        glui_column.cpp                 glui_internal_control.h         glui_radio.cpp                  glui_statictext.cpp             glui_window.cpp
57 glui_add_controls.cpp           glui_commandline.cpp            glui_list.cpp                   glui_rollout.cpp                glui_string.cpp                 quaternion.cpp
58 algebra3.cpp                    glui_bitmap_img_data.cpp        glui_control.cpp                glui_listbox.cpp                glui_rotation.cpp               glui_textbox.cpp                quaternion.h
59 algebra3.h                      glui_bitmaps.cpp                glui_edittext.cpp               glui_mouse_iaction.cpp          glui_scrollbar.cpp              glui_translation.cpp            
60 arcball.cpp                     glui_button.cpp                 glui_filebrowser.cpp            glui_node.cpp                   glui_separator.cpp              glui_tree.cpp
61         
62 )
63
64 IF (BUILD_SHARED_LIBS)
65   TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
66 ENDIF (BUILD_SHARED_LIBS)