Skip to content

Commit

Permalink
CMakeLists.txt: Only call install() targets on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
tseli0s committed Sep 3, 2022
1 parent 2570ef1 commit efece5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@ target_include_directories(nvdialog PRIVATE include/)
# Required to find the system paths easier.
include(GNUInstallDirs)

install(TARGETS nvdialog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES include/nvdialog.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# On Windows the installation procedure is a bit different
# so until we resolve this the library and the header have to
# be manually installed.
if (!WIN32_TARGET OR !WIN32)
install(TARGETS nvdialog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES include/nvdialog.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()

0 comments on commit efece5e

Please sign in to comment.