Precompile sol.hpp in order to reduce compilation time.

This commit is contained in:
Petr Mikheev 2021-12-04 11:32:39 +00:00 committed by Evil Eye
parent 4d346fefd6
commit d3df3efaf1
5 changed files with 16 additions and 4 deletions

View file

@ -153,9 +153,12 @@ target_link_libraries(openmw
"osg-ffmpeg-videoplayer"
"oics"
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)
target_link_libraries(openmw EGL android log z)
endif (ANDROID)

View file

@ -1,4 +1,6 @@
#ifndef stderr
int stderr = 0; // Hack: fix linker error
#endif
#include "SDL_main.h"
#include <SDL_gamecontroller.h>

View file

@ -70,7 +70,7 @@ if (GTEST_FOUND AND GMOCK_FOUND)
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
if (UNIX AND NOT APPLE)
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})