mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
c23487500b
* opt: upgrade xapian to 1.4.22 and fix debug compilation * fix: cmake on Windows
44 lines
1.6 KiB
CMake
44 lines
1.6 KiB
CMake
target_compile_definitions(${GOLDENDICT} PUBLIC
|
|
__WIN32
|
|
INCLUDE_LIBRARY_PATH # temporal hack to let singleapplication compile
|
|
)
|
|
|
|
target_include_directories(${GOLDENDICT} PUBLIC
|
|
${CMAKE_SOURCE_DIR}/winlibs/include/
|
|
)
|
|
|
|
set_property(TARGET ${BIN_NAME} PROPERTY
|
|
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
|
|
|
file(GLOB WINLIBS_FILES "${CMAKE_SOURCE_DIR}/winlibs/lib/msvc/*.lib")
|
|
foreach (A_WIN_LIB ${WINLIBS_FILES})
|
|
target_link_libraries(${GOLDENDICT} PRIVATE ${A_WIN_LIB})
|
|
endforeach ()
|
|
|
|
file(GLOB WINLIBS_FILES "${CMAKE_SOURCE_DIR}/winlibs/lib/xapian/rel/*.lib")
|
|
foreach (A_WIN_LIB ${WINLIBS_FILES})
|
|
target_link_libraries(${GOLDENDICT} PRIVATE ${A_WIN_LIB})
|
|
endforeach ()
|
|
|
|
# Copy .dlls to output dir
|
|
|
|
file(GLOB DLL_FILES LIST_DIRECTORIES false "${CMAKE_SOURCE_DIR}/winlibs/lib/msvc/*.dll")
|
|
foreach (A_DLL_FILE ${DLL_FILES})
|
|
get_filename_component(TEMP_VAR_HOLDING_DLL_FILENAME ${A_DLL_FILE} NAME)
|
|
configure_file("${A_DLL_FILE}" "${CMAKE_BINARY_DIR}/${TEMP_VAR_HOLDING_DLL_FILENAME}" COPYONLY)
|
|
endforeach ()
|
|
|
|
file(GLOB DLL_FILES LIST_DIRECTORIES false "${CMAKE_SOURCE_DIR}/winlibs/lib/xapian/rel/*.dll")
|
|
foreach (A_DLL_FILE ${DLL_FILES})
|
|
get_filename_component(TEMP_VAR_HOLDING_DLL_FILENAME ${A_DLL_FILE} NAME)
|
|
configure_file("${A_DLL_FILE}" "${CMAKE_BINARY_DIR}/${TEMP_VAR_HOLDING_DLL_FILENAME}" COPYONLY)
|
|
endforeach ()
|
|
|
|
if (WITH_EPWING_SUPPORT)
|
|
add_subdirectory(thirdparty/eb)
|
|
target_include_directories(${GOLDENDICT} PRIVATE
|
|
thirdparty
|
|
)
|
|
target_link_libraries(${GOLDENDICT} PRIVATE eb)
|
|
endif ()
|