Skip to content

Commit

Permalink
CMake: Add UNIX install target
Browse files Browse the repository at this point in the history
Add installation target for UNIX systems.

This defaults to install under /usr/local/bin/ and
/usr/local/share/magicseteditor/ but is configurable through the
CMAKE_INSTALL_PREFIX variable.
  • Loading branch information
mattiasb committed Apr 18, 2021
1 parent e2da60e commit ab6163b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ if(WIN32)
)
endif()

if(UNIX)
include(GNUInstallDirs)
install(TARGETS magicseteditor DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/data" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/magicseteditor")
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/resource" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/magicseteditor")
endif()

# warnings
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
Expand Down

0 comments on commit ab6163b

Please sign in to comment.