Skip to content

Commit

Permalink
avoid commenting out cmake lines
Browse files Browse the repository at this point in the history
  • Loading branch information
agl-alexglopez committed Aug 5, 2024
1 parent 13f1c61 commit b3625d0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions cmake/Installing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,23 @@ set(INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
CACHE STRING "Path to ${PROJECT_NAME} CMake files"
)

# Default destinations from GNUInstallDirs are only changed for debug config.
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
FILE_SET public_headers
# these get default values from GNUInstallDirs, no need to set them
#RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/debug/bin # bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/debug # lib/debug
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/debug # lib/debug
# except for public headers, as we want them to be inside a library folder
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} # include/str_view
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # include
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
FILE_SET public_headers
# these get default values from GNUInstallDirs, no need to set them
#RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # lib
# except for public headers, as we want them to be inside a library folder
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} # include/str_view
# All destinations are default in release except header location.
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} # include/str_view/
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # include
)
endif()
Expand Down

0 comments on commit b3625d0

Please sign in to comment.