summaryrefslogtreecommitdiff
path: root/indra/llwindow/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/CMakeLists.txt')
-rwxr-xr-x[-rw-r--r--]indra/llwindow/CMakeLists.txt97
1 files changed, 61 insertions, 36 deletions
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 341bddfffd..ad010164eb 100644..100755
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -32,12 +32,17 @@ include_directories(
${LLXML_INCLUDE_DIRS}
${DIRECTX_INCLUDE_DIR}
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
+ )
set(llwindow_SOURCE_FILES
llkeyboard.cpp
llkeyboardheadless.cpp
llwindowheadless.cpp
llwindowcallbacks.cpp
+ llwindow.cpp
)
set(llwindow_HEADER_FILES
@@ -50,7 +55,6 @@ set(llwindow_HEADER_FILES
)
set(viewer_SOURCE_FILES
- llwindow.cpp
llmousehandler.cpp
)
@@ -62,13 +66,43 @@ set(viewer_HEADER_FILES
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
-if (LINUX AND VIEWER)
+if (LINUX)
set(llwindow_LINK_LIBRARIES
+ ${LLCOMMON_LIBRARIES}
+ ${LLIMAGE_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLRENDER_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLWINDOW_LIBRARIES}
+ ${LLXML_LIBRARIES}
${UI_LIBRARIES} # for GTK
${SDL_LIBRARY}
fontconfig # For FCInit and other FC* functions.
)
-endif (LINUX AND VIEWER)
+
+ list(APPEND viewer_SOURCE_FILES
+ llkeyboardsdl.cpp
+ llwindowsdl.cpp
+ )
+ list(APPEND viewer_HEADER_FILES
+ llkeyboardsdl.h
+ llwindowsdl.h
+ )
+
+ if (BUILD_HEADLESS)
+ set(llwindowheadless_LINK_LIBRARIES
+ ${LLCOMMON_LIBRARIES}
+ ${LLIMAGE_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLRENDER_HEADLESS_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLWINDOW_HEADLESS_LIBRARIES}
+ ${LLXML_LIBRARIES}
+ fontconfig # For FCInit and other FC* functions.
+ )
+ endif (BUILD_HEADLESS)
+
+endif (LINUX)
if (DARWIN)
list(APPEND llwindow_SOURCE_FILES
@@ -91,16 +125,6 @@ if (DARWIN)
)
endif (DARWIN)
-if (LINUX AND VIEWER)
- list(APPEND viewer_SOURCE_FILES
- llkeyboardsdl.cpp
- llwindowsdl.cpp
- )
- list(APPEND viewer_HEADER_FILES
- llkeyboardsdl.h
- llwindowsdl.h
- )
-endif (LINUX AND VIEWER)
if (WINDOWS)
list(APPEND llwindow_SOURCE_FILES
@@ -133,40 +157,41 @@ endif (SOLARIS)
set_source_files_properties(${llwindow_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
-if (SERVER AND NOT WINDOWS AND NOT DARWIN)
- set(server_SOURCE_FILES
+if (BUILD_HEADLESS)
+ set(llwindowheadless_SOURCE_FILES
llwindowmesaheadless.cpp
+ llmousehandler.cpp
)
- set(server_HEADER_FILES
+ set(llwindowheadless_HEADER_FILES
llwindowmesaheadless.h
+ llmousehandler.h
)
- copy_server_sources(
- llwindow
- )
-
-
- set_source_files_properties(
- ${server_SOURCE_FILES}
- PROPERTIES
- COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
- )
add_library (llwindowheadless
${llwindow_SOURCE_FILES}
- ${server_SOURCE_FILES}
+ ${llwindowheadless_SOURCE_FILES}
)
- target_link_libraries (llwindowheadless ${llwindow_LINK_LIBRARIES})
-endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
+ set_property(TARGET llwindowheadless
+ PROPERTY COMPILE_DEFINITIONS LL_MESA=1 LL_MESA_HEADLESS=1
+ )
+ target_link_libraries (llwindowheadless ${llwindowheadless_LINK_LIBRARIES} dl)
+endif (BUILD_HEADLESS)
if (llwindow_HEADER_FILES)
list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES})
endif (llwindow_HEADER_FILES)
- list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
-if (VIEWER)
- add_library (llwindow
- ${llwindow_SOURCE_FILES}
- ${viewer_SOURCE_FILES}
+list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
+
+add_library (llwindow
+ ${llwindow_SOURCE_FILES}
+ ${viewer_SOURCE_FILES}
+ )
+
+if (SDL_FOUND)
+ set_property(TARGET llwindow
+ PROPERTY COMPILE_DEFINITIONS LL_SDL=1
)
- target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
-endif (VIEWER)
+endif (SDL_FOUND)
+
+target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})