PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 40ms app.codeStats 0ms

/indra/media_plugins/example/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 82 lines | 65 code | 14 blank | 3 comment | 4 complexity | 9a73be10c34f8531db77256b43d55df4 MD5 | raw file
 1# -*- cmake -*-
 2
 3project(media_plugin_example)
 4
 5include(00-Common)
 6include(LLCommon)
 7include(LLImage)
 8include(LLPlugin)
 9include(LLMath)
10include(LLRender)
11include(LLWindow)
12include(Linking)
13include(PluginAPI)
14include(MediaPluginBase)
15include(FindOpenGL)
16
17include(ExamplePlugin)
18
19include_directories(
20    ${LLPLUGIN_INCLUDE_DIRS}
21    ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
22    ${LLCOMMON_INCLUDE_DIRS}
23    ${LLMATH_INCLUDE_DIRS}
24    ${LLIMAGE_INCLUDE_DIRS}
25    ${LLRENDER_INCLUDE_DIRS}
26    ${LLWINDOW_INCLUDE_DIRS}
27)
28
29
30### media_plugin_example
31
32if(NOT WORD_SIZE EQUAL 32)
33  if(WINDOWS)
34    add_definitions(/FIXED:NO)
35  else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
36    add_definitions(-fPIC)
37  endif(WINDOWS)
38endif(NOT WORD_SIZE EQUAL 32)
39
40set(media_plugin_example_SOURCE_FILES
41    media_plugin_example.cpp
42    )
43
44add_library(media_plugin_example
45    SHARED
46    ${media_plugin_example_SOURCE_FILES}
47)
48
49target_link_libraries(media_plugin_example
50  ${LLPLUGIN_LIBRARIES}
51  ${MEDIA_PLUGIN_BASE_LIBRARIES}
52  ${LLCOMMON_LIBRARIES}
53  ${EXAMPLE_PLUGIN_LIBRARIES}
54  ${PLUGIN_API_WINDOWS_LIBRARIES}
55)
56
57add_dependencies(media_plugin_example
58  ${LLPLUGIN_LIBRARIES}
59  ${MEDIA_PLUGIN_BASE_LIBRARIES}
60  ${LLCOMMON_LIBRARIES}
61)
62
63if (WINDOWS)
64  set_target_properties(
65    media_plugin_example
66    PROPERTIES
67    LINK_FLAGS "/MANIFEST:NO"
68    )
69endif (WINDOWS)
70
71if (DARWIN)
72  # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
73  set_target_properties(
74    media_plugin_example
75    PROPERTIES
76    PREFIX ""
77    BUILD_WITH_INSTALL_RPATH 1
78    INSTALL_NAME_DIR "@executable_path"
79    LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
80  )
81
82endif (DARWIN)