File: CMakeLists.txt

package info (click to toggle)
mygui 3.2.2+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 36,224 kB
  • sloc: cpp: 118,031; ansic: 30,202; xml: 15,544; cs: 12,602; tcl: 776; python: 417; makefile: 34
file content (41 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download | duplicates (2)
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
set (PROJECTNAME MyGUI.OpenGLPlatform)

include_directories(
 include
 ${MYGUI_SOURCE_DIR}/MyGUIEngine/include
 ${OPENGL_INCLUDE_DIR}
 ${MYGUI_SOURCE_DIR}/Common
)

include(${PROJECTNAME}.list)
if(NOT MYGUI_USE_SYSTEM_GLEW)
	set (SOURCE_FILES ${SOURCE_FILES} include/GL/glew.c)
endif()

if(NOT MYGUI_USE_SYSTEM_GLEW)
	add_definitions(-DGLEW_STATIC)
endif()
add_definitions(-DGL_GLEXT_PROTOTYPES)

add_library(${PROJECTNAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
set_target_properties(${PROJECTNAME} PROPERTIES VERSION 0debian1.0.0 SOVERSION 0debian1)

add_dependencies(${PROJECTNAME} MyGUIEngine)

target_link_libraries(${PROJECTNAME} ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} MyGUIEngine)
if(MYGUI_USE_SYSTEM_GLEW)
	target_link_libraries(${PROJECTNAME} ${GLEW_LIBRARIES})
endif()

link_directories(${OPENGL_LIB_DIR} ${PNG_LIBRARY})

# installation rules
install(FILES ${HEADER_FILES}
        DESTINATION include/MYGUI
)
mygui_install_target(${PROJECTNAME} "")

if (MYGUI_HIGH_LEVEL_WARNINGS)
        set_source_files_properties(include/GL/glew.c PROPERTIES COMPILE_FLAGS -w)
        set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS -Wno-reserved-id-macro)
endif ()