Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/test/CMakeLists.txt
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
| # wcwidth | # wcwidth | ||||
| include(${CMAKE_SOURCE_DIR}/../../../extern/wcwidth/CMakeLists.txt) | include(${CMAKE_SOURCE_DIR}/../../../extern/wcwidth/CMakeLists.txt) | ||||
| suffix_relpaths(INC_NEW "${INC}" "../../../extern/wcwidth/") | suffix_relpaths(INC_NEW "${INC}" "../../../extern/wcwidth/") | ||||
| suffix_relpaths(SRC_NEW "${SRC}" "../../../extern/wcwidth/") | suffix_relpaths(SRC_NEW "${SRC}" "../../../extern/wcwidth/") | ||||
| include_directories(${INC_NEW}) | include_directories(${INC_NEW}) | ||||
| add_library(wcwidth_lib ${SRC_NEW}) | add_library(wcwidth_lib ${SRC_NEW}) | ||||
| # glew-mx | |||||
| include(${CMAKE_SOURCE_DIR}/../../../intern/glew-mx/CMakeLists.txt) | |||||
| suffix_relpaths(INC_NEW "${INC}" "../../../intern/glew-mx/") | |||||
| suffix_relpaths(SRC_NEW "${SRC}" "../../../intern/glew-mx/") | |||||
| include_directories(${INC_NEW}) | |||||
| add_library(glewmx_lib ${SRC_NEW}) | |||||
| # grr, blenfont needs BLI | # grr, blenfont needs BLI | ||||
| include_directories( | include_directories( | ||||
| "../../../source/blender/blenlib" | "../../../source/blender/blenlib" | ||||
| ) | ) | ||||
| # Needed for math_matrix.c to avoid eigen_capi.h dep. | # Needed for math_matrix.c to avoid eigen_capi.h dep. | ||||
| add_definitions(-DMATH_STANDALONE) | add_definitions(-DMATH_STANDALONE) | ||||
| Show All 39 Lines | |||||
| include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont) | include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont) | ||||
| if(CMAKE_COMPILER_IS_GNUCC) | if(CMAKE_COMPILER_IS_GNUCC) | ||||
| set(PLATFORM_CFLAGS "-funsigned-char") | set(PLATFORM_CFLAGS "-funsigned-char") | ||||
| endif() | endif() | ||||
| if(UNIX AND NOT APPLE) | if(UNIX AND NOT APPLE) | ||||
| find_package(X11 REQUIRED) | find_package(X11 REQUIRED) | ||||
| find_package(GLEW) | |||||
| if(NOT GLEW_FOUND) | |||||
| message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW") | |||||
| endif() | |||||
| set(PLATFORM_LINKLIBS | set(PLATFORM_LINKLIBS | ||||
| ${X11_X11_LIB} | ${X11_X11_LIB} | ||||
| ${X11_Xinput_LIB} | ${X11_Xinput_LIB} | ||||
| ${GLEW_LIBRARY} | |||||
| -lpthread | -lpthread | ||||
| ) | ) | ||||
| else() | |||||
| # set(GLEW_LIBRARY "") # unused | |||||
| set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include") | |||||
| endif() | endif() | ||||
| string(APPEND CMAKE_C_FLAGS " ${PLATFORM_CFLAGS}") | string(APPEND CMAKE_C_FLAGS " ${PLATFORM_CFLAGS}") | ||||
| string(APPEND CMAKE_CXX_FLAGS " ${PLATFORM_CFLAGS}") | string(APPEND CMAKE_CXX_FLAGS " ${PLATFORM_CFLAGS}") | ||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||
| # Executables | # Executables | ||||
| # Gears (C) | # Gears (C) | ||||
| add_executable(gears_c | add_executable(gears_c | ||||
| ${CMAKE_SOURCE_DIR}/gears/GHOST_C-Test.c) | ${CMAKE_SOURCE_DIR}/gears/GHOST_C-Test.c) | ||||
| target_link_libraries(gears_c | target_link_libraries(gears_c | ||||
| ghost_lib | ghost_lib | ||||
| glewmx_lib | |||||
| string_lib | string_lib | ||||
| ${OPENGL_gl_LIBRARY} | ${OPENGL_gl_LIBRARY} | ||||
| ${CMAKE_DL_LIBS} | ${CMAKE_DL_LIBS} | ||||
| ${PLATFORM_LINKLIBS} | ${PLATFORM_LINKLIBS} | ||||
| ) | ) | ||||
| # Gears (C++) | # Gears (C++) | ||||
| add_executable(gears_cpp | add_executable(gears_cpp | ||||
| ${CMAKE_SOURCE_DIR}/gears/GHOST_Test.cpp) | ${CMAKE_SOURCE_DIR}/gears/GHOST_Test.cpp) | ||||
| target_link_libraries(gears_cpp | target_link_libraries(gears_cpp | ||||
| ghost_lib | ghost_lib | ||||
| glewmx_lib | |||||
| string_lib | string_lib | ||||
| ${OPENGL_gl_LIBRARY} | ${OPENGL_gl_LIBRARY} | ||||
| ${CMAKE_DL_LIBS} | ${CMAKE_DL_LIBS} | ||||
| ${PLATFORM_LINKLIBS} | ${PLATFORM_LINKLIBS} | ||||
| ) | ) | ||||
| # MultiTest (C) | # MultiTest (C) | ||||
| Show All 10 Lines | |||||
| target_link_libraries(multitest_c | target_link_libraries(multitest_c | ||||
| blenfont_lib | blenfont_lib | ||||
| bli_lib | bli_lib | ||||
| gpu_lib | gpu_lib | ||||
| # imbuf_lib | # imbuf_lib | ||||
| ghost_lib | ghost_lib | ||||
| bli_lib # again... | bli_lib # again... | ||||
| glewmx_lib | |||||
| string_lib | string_lib | ||||
| numaapi_lib | numaapi_lib | ||||
| guardedalloc_lib | guardedalloc_lib | ||||
| wcwidth_lib | wcwidth_lib | ||||
| ${OPENGL_gl_LIBRARY} | ${OPENGL_gl_LIBRARY} | ||||
| ${FREETYPE_LIBRARIES} ${BROTLI_LIBRARIES} | ${FREETYPE_LIBRARIES} ${BROTLI_LIBRARIES} | ||||
| ${ZLIB_LIBRARIES} | ${ZLIB_LIBRARIES} | ||||
| ${CMAKE_DL_LIBS} | ${CMAKE_DL_LIBS} | ||||
| ${PLATFORM_LINKLIBS} | ${PLATFORM_LINKLIBS} | ||||
| ) | ) | ||||