1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/essimporter/CMakeLists.txt
AnyOldName3 26be98966f Modernise Boost CMake stuff
Resolves https://gitlab.com/OpenMW/openmw/-/issues/8100

Also removes some old crud.
Hopefully the old crud is all:
* Handled automatically by CMake now we're using the modern approach.
* A hack-fix for a problem caused by not using the modern approach.
* Massively outdated so no longer necessary.

If it turns out this makes CI fail, I'll tweak things as necessary.

Changes that might not be wanted include:
* Getting rid of our BOOST_STATIC CMake option. In cases where the CMake config doesn't make the one correct choice from the build environment (i.e. because there's a choice) the CMake config exposes the option already.
  However, we were forcing this on for Windows, so that might matter.
  It seems to default to static on my machine even though I thought I read something suggesting otherwise, so we'll see how things go with that.
  If we eventually put CMake in charge of installing dependency DLLs this will be a moot point as we won't need to care.
* Bumping the minimum version of Boost to 1.70.0, as that's the first with working CMake config.
  It's from 2019, so plausibly there are distros too scared to use a library from five years ago as it can't legally drink in the US (although it could in limited quantities with parental supervision in the UK, as long as it's just something inconsequential like a single sip of beer).
2024-08-23 14:06:13 +01:00

59 lines
1.2 KiB
CMake

set(ESSIMPORTER_FILES
main.cpp
importer.cpp
importplayer.cpp
importnpcc.cpp
importcrec.cpp
importcellref.cpp
importinventory.cpp
importklst.cpp
importcntc.cpp
importgame.cpp
importinfo.cpp
importdial.cpp
importques.cpp
importjour.cpp
importscri.cpp
importscpt.cpp
importproj.cpp
importsplm.cpp
importercontext.cpp
converter.cpp
convertacdt.cpp
convertnpcc.cpp
convertinventory.cpp
convertcrec.cpp
convertcntc.cpp
convertscri.cpp
convertscpt.cpp
convertplayer.cpp
)
openmw_add_executable(openmw-essimporter
${ESSIMPORTER_FILES}
)
target_link_libraries(openmw-essimporter
Boost::program_options
components
)
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-essimporter PRIVATE --coverage)
target_link_libraries(openmw-essimporter gcov)
endif()
if (WIN32)
INSTALL(TARGETS openmw-essimporter RUNTIME DESTINATION ".")
endif(WIN32)
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw-essimporter PRIVATE
<algorithm>
<filesystem>
<fstream>
<string>
<vector>
)
endif()