mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
CMake: massive rework for Mac build and other improvements
- macOS: RPATH-related code all removed or disabled - macOS: new osx/CMakeLists.txt to run some install-code running after all subdirectories - Assets copying into the runtime output directory implemented for Mac and Linux development
This commit is contained in:
@@ -308,6 +308,12 @@ vcmi_set_output_dir(vcmi "")
|
||||
set_target_properties(vcmi PROPERTIES ${PCH_PROPERTIES})
|
||||
cotire(vcmi)
|
||||
|
||||
if(NOT APPLE) # Already inside vcmiclient bundle
|
||||
install(TARGETS vcmi RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
|
||||
endif()
|
||||
# We want to deploy assets into build directory for easier debugging without install
|
||||
add_custom_command(TARGET vcmi POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/config ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Mods ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
|
||||
)
|
||||
|
||||
install(TARGETS vcmi RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
|
||||
|
||||
@@ -452,7 +452,7 @@ bfs::path VCMIDirsOSX::userConfigPath() const { return userDataPath() / "config"
|
||||
|
||||
std::vector<bfs::path> VCMIDirsOSX::dataPaths() const
|
||||
{
|
||||
return std::vector<bfs::path>(1, "../Data");
|
||||
return std::vector<bfs::path>(1, "../Resources/Data");
|
||||
}
|
||||
|
||||
bfs::path VCMIDirsOSX::libraryPath() const { return "."; }
|
||||
|
||||
@@ -19,6 +19,4 @@ vcmi_set_output_dir(minizip "")
|
||||
|
||||
target_link_libraries(minizip ${ZLIB_LIBRARIES})
|
||||
|
||||
if (NOT APPLE) # Already inside vcmiclient bundle
|
||||
install(TARGETS minizip RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
|
||||
endif()
|
||||
install(TARGETS minizip RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
|
||||
|
||||
Reference in New Issue
Block a user