build: Install pattern files in the right place (#564)

This commit is contained in:
iTrooz_ 2022-06-30 15:11:00 +02:00 committed by GitHub
parent bb429aae62
commit cd34d567a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -70,13 +70,11 @@ macro(detectOS)
set(CMAKE_INSTALL_BINDIR ".")
set(CMAKE_INSTALL_LIBDIR ".")
set(PLUGINS_INSTALL_LOCATION "plugins")
set(MAGIC_INSTALL_LOCATION "magic")
elseif (APPLE)
add_compile_definitions(OS_MACOS)
set(CMAKE_INSTALL_BINDIR ".")
set(CMAKE_INSTALL_LIBDIR ".")
set(PLUGINS_INSTALL_LOCATION "plugins")
set(MAGIC_INSTALL_LOCATION "magic")
enable_language(OBJC)
enable_language(OBJCXX)
elseif (UNIX AND NOT APPLE)
@ -84,7 +82,6 @@ macro(detectOS)
set(CMAKE_INSTALL_BINDIR "bin")
set(CMAKE_INSTALL_LIBDIR "lib")
set(PLUGINS_INSTALL_LOCATION "share/imhex/plugins")
set(MAGIC_INSTALL_LOCATION "share/imhex/magic")
else ()
message(FATAL_ERROR "Unknown / unsupported system!")
endif()
@ -228,7 +225,7 @@ macro(createPackage)
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
downloadImHexPatternsFiles("./")
downloadImHexPatternsFiles("./share/imhex")
endif()
write_file(version ${PROJECT_VERSION})