Skip to content

Commit

Permalink
Merge branch 'add_python' of https://github.com/LLNL/units into add_p…
Browse files Browse the repository at this point in the history
…ython
  • Loading branch information
phlptp committed Dec 20, 2024
2 parents b03291c + dd286f3 commit 566b7db
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions units/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ elseif(UNITS_BUILD_STATIC_LIBRARY)
if(CMAKE_CXX_STANDARD GREATER 16)
target_compile_definitions(units PRIVATE -DUNITS_CONSTEXPR_IF_SUPPORTED=1)
endif()
if(UNITS_INSTALL AND NOT UNITS_BINARY_ONLY_INSTALL AND NOT SKBUILD)
if(UNITS_INSTALL
AND NOT UNITS_BINARY_ONLY_INSTALL
AND NOT SKBUILD
)
install(TARGETS units ${UNITS_LIBRARY_EXPORT_COMMAND}
DESTINATION ${CMAKE_INSTALL_LIBDIR} # INCLUDES DESTINATION
# include/${PROJECT_NAME}
Expand All @@ -179,7 +182,10 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_compile_definitions(header_only INTERFACE UNITS_HEADER_ONLY)
if(UNITS_INSTALL AND NOT UNITS_BINARY_ONLY_ AND NOT SKBUILD)
if(UNITS_INSTALL
AND NOT UNITS_BINARY_ONLY_
AND NOT SKBUILD
)
install(TARGETS header_only ${UNITS_LIBRARY_EXPORT_COMMAND})
endif()
if(UNITS_NAMESPACE)
Expand All @@ -194,7 +200,10 @@ if(UNITS_BASE_TYPE)
endif()
add_library(${UNITS_LC_PROJECT_NAME}::header_only ALIAS header_only)

if(UNITS_INSTALL AND NOT UNITS_BINARY_ONLY_INSTALL AND NOT SKBUILD)
if(UNITS_INSTALL
AND NOT UNITS_BINARY_ONLY_INSTALL
AND NOT SKBUILD
)
install(FILES ${units_header_files}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${UNITS_LC_PROJECT_NAME}
)
Expand Down

0 comments on commit 566b7db

Please sign in to comment.