Fixing up Windows build.
This commit is contained in:
parent
32ace0fcac
commit
5d32592126
22 changed files with 247994 additions and 53 deletions
|
@ -1,18 +1,9 @@
|
|||
list(APPEND graphics_LIB_INCLUDES
|
||||
DrawingContext.cpp
|
||||
DrawingManager.cpp
|
||||
DrawingSurface.cpp
|
||||
opengl/OpenGlInterface.cpp
|
||||
cairo/CairoInterface.cpp
|
||||
cairo/CairoDrawingSurface.cpp
|
||||
cairo/CairoDrawingContext.cpp)
|
||||
|
||||
list(APPEND graphics_HEADERS
|
||||
opengl/OpenGlInterface.h
|
||||
cairo/CairoInterface.h
|
||||
INativeDrawingSurface.h
|
||||
INativeDrawingContext.h)
|
||||
set(platform_LIB_INCLUDES "")
|
||||
set(platform_INCLUDE_DIRS "")
|
||||
set(platform_HEADERS "")
|
||||
set(platform_LIBS "")
|
||||
|
||||
if (UNIX)
|
||||
find_package(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_CAIRO cairo)
|
||||
FIND_PATH(CAIRO_INCLUDE_DIRS
|
||||
|
@ -27,13 +18,48 @@ FIND_LIBRARY(CAIRO_LIBRARIES
|
|||
HINTS ${PC_CAIRO_LIBDIR}
|
||||
${PC_CAIRO_LIBRARY_DIRS}
|
||||
)
|
||||
list(APPEND platform_LIB_INCLUDES
|
||||
cairo/CairoInterface.cpp
|
||||
cairo/CairoDrawingSurface.cpp
|
||||
cairo/CairoDrawingContext.cpp
|
||||
)
|
||||
list(APPEND platform_INCLUDE_DIRS
|
||||
${CAIRO_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND platform_HEADERS
|
||||
cairo/CairoInterface.h
|
||||
)
|
||||
list(APPEND platform_LIBS
|
||||
${CAIRO_LIBRARIES}
|
||||
GL
|
||||
)
|
||||
else()
|
||||
list(APPEND platform_LIBS
|
||||
OpenGL32.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND graphics_LIB_INCLUDES
|
||||
DrawingContext.cpp
|
||||
DrawingManager.cpp
|
||||
DrawingSurface.cpp
|
||||
opengl/OpenGlInterface.cpp
|
||||
${platform_LIB_INCLUDES}
|
||||
)
|
||||
|
||||
list(APPEND graphics_HEADERS
|
||||
opengl/OpenGlInterface.h
|
||||
${platform_HEADERS}
|
||||
INativeDrawingSurface.h
|
||||
INativeDrawingContext.h)
|
||||
|
||||
|
||||
add_library(graphics SHARED
|
||||
${graphics_LIB_INCLUDES}
|
||||
${graphics_HEADERS})
|
||||
|
||||
target_include_directories(graphics PUBLIC
|
||||
${CAIRO_INCLUDE_DIRS}
|
||||
${platform_INCLUDE_DIRS}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cairo"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/opengl"
|
||||
|
@ -41,6 +67,7 @@ target_include_directories(graphics PUBLIC
|
|||
"${PROJECT_SOURCE_DIR}/src/visual_elements/"
|
||||
)
|
||||
|
||||
target_link_libraries(graphics PUBLIC visual_elements GL ${CAIRO_LIBRARIES})
|
||||
target_link_libraries(graphics PUBLIC visual_elements ${platform_LIBS})
|
||||
|
||||
set_property(TARGET graphics PROPERTY FOLDER src)
|
||||
set_property(TARGET graphics PROPERTY FOLDER src)
|
||||
set_target_properties( graphics PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
|
Loading…
Add table
Add a link
Reference in a new issue