mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-15 23:42:20 +00:00
Precompile sol.hpp in order to reduce compilation time.
This commit is contained in:
parent
4d346fefd6
commit
d3df3efaf1
@ -414,7 +414,8 @@ else(USE_LUAJIT)
|
|||||||
endif(USE_LUAJIT)
|
endif(USE_LUAJIT)
|
||||||
|
|
||||||
# C++ library binding to Lua
|
# C++ library binding to Lua
|
||||||
set(SOL_INCLUDE_DIRS ${OpenMW_SOURCE_DIR}/extern/sol3.2.2 ${OpenMW_SOURCE_DIR}/extern/sol_config)
|
set(SOL_INCLUDE_DIR ${OpenMW_SOURCE_DIR}/extern/sol3.2.2)
|
||||||
|
set(SOL_CONFIG_DIR ${OpenMW_SOURCE_DIR}/extern/sol_config)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
BEFORE SYSTEM
|
BEFORE SYSTEM
|
||||||
@ -426,7 +427,8 @@ include_directories(
|
|||||||
${OPENGL_INCLUDE_DIR}
|
${OPENGL_INCLUDE_DIR}
|
||||||
${BULLET_INCLUDE_DIRS}
|
${BULLET_INCLUDE_DIRS}
|
||||||
${LUA_INCLUDE_DIR}
|
${LUA_INCLUDE_DIR}
|
||||||
${SOL_INCLUDE_DIRS}
|
${SOL_INCLUDE_DIR}
|
||||||
|
${SOL_CONFIG_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
link_directories(${SDL2_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
|
link_directories(${SDL2_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
|
||||||
|
@ -153,9 +153,12 @@ target_link_libraries(openmw
|
|||||||
"osg-ffmpeg-videoplayer"
|
"osg-ffmpeg-videoplayer"
|
||||||
"oics"
|
"oics"
|
||||||
components
|
components
|
||||||
${LUA_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
|
||||||
|
target_precompile_headers(openmw PRIVATE ${SOL_INCLUDE_DIR}/sol/sol.hpp)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
target_link_libraries(openmw EGL android log z)
|
target_link_libraries(openmw EGL android log z)
|
||||||
endif (ANDROID)
|
endif (ANDROID)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
#ifndef stderr
|
||||||
int stderr = 0; // Hack: fix linker error
|
int stderr = 0; // Hack: fix linker error
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SDL_main.h"
|
#include "SDL_main.h"
|
||||||
#include <SDL_gamecontroller.h>
|
#include <SDL_gamecontroller.h>
|
||||||
|
@ -70,7 +70,7 @@ if (GTEST_FOUND AND GMOCK_FOUND)
|
|||||||
|
|
||||||
openmw_add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
openmw_add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
||||||
|
|
||||||
target_link_libraries(openmw_test_suite ${GMOCK_LIBRARIES} components ${LUA_LIBRARIES})
|
target_link_libraries(openmw_test_suite ${GMOCK_LIBRARIES} components)
|
||||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
@ -283,6 +283,7 @@ target_link_libraries(components
|
|||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
${OPENGL_gl_LIBRARY}
|
${OPENGL_gl_LIBRARY}
|
||||||
${MyGUI_LIBRARIES}
|
${MyGUI_LIBRARIES}
|
||||||
|
${LUA_LIBRARIES}
|
||||||
LZ4::LZ4
|
LZ4::LZ4
|
||||||
RecastNavigation::DebugUtils
|
RecastNavigation::DebugUtils
|
||||||
RecastNavigation::Detour
|
RecastNavigation::Detour
|
||||||
@ -371,3 +372,7 @@ endif(OSG_STATIC)
|
|||||||
if(USE_QT)
|
if(USE_QT)
|
||||||
set_property(TARGET components_qt PROPERTY AUTOMOC ON)
|
set_property(TARGET components_qt PROPERTY AUTOMOC ON)
|
||||||
endif(USE_QT)
|
endif(USE_QT)
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
|
||||||
|
target_precompile_headers(components PRIVATE ${SOL_INCLUDE_DIR}/sol/sol.hpp)
|
||||||
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user