Skip to content

Commit

Permalink
Merge pull request #121 from saxbophone/josh/119-version-dependent-he…
Browse files Browse the repository at this point in the history
…aders

Add version dependent headers
  • Loading branch information
saxbophone authored Oct 28, 2016
2 parents 62221b0 + d50cb2f commit 58ff5ee
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ if(CMAKE_SIZEOF_VOID_P LESS 8)
message(
WARNING
"It looks like this system's architecture is not at least 64-bit.\n"
"libsaxbospiral requires a system with an architecture of at least 64 bits!")
"libsaxbospiral requires a system with an architecture of at least 64 bits!\n"
"We'll continue trying to compile anyway, be sure to run the unit tests after."
)
endif()

# pass in version of library as preprocessor definitions
Expand Down Expand Up @@ -123,15 +125,37 @@ install(
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Install main library header files

# Generate rough (nearest major) version-dependent header installation folder
set(
LIBSAXBOSPIRAL_ROUGH_HEADER_DESTINATION
"saxbospiral-${PROJECT_VERSION_MAJOR}"
)
# Generate precise (major and minor) version-dependent header installation folder
set(
LIBSAXBOSPIRAL_PRECISE_HEADER_DESTINATION
"saxbospiral-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
)

# Install main library header files, both to rough and precise install locations
install(
FILES ${LIB_SAXBOSPIRAL_HEADERS}
DESTINATION "include/${LIBSAXBOSPIRAL_ROUGH_HEADER_DESTINATION}"
)
# Install render_backends header files
install(
FILES ${LIB_SAXBOSPIRAL_RENDER_BACKENDS_HEADERS}
DESTINATION "include/${LIBSAXBOSPIRAL_ROUGH_HEADER_DESTINATION}/render_backends"
)

install(
FILES ${LIB_SAXBOSPIRAL_HEADERS}
DESTINATION include/saxbospiral
DESTINATION "include/${LIBSAXBOSPIRAL_PRECISE_HEADER_DESTINATION}"
)
# Install render_backends header files
install(
FILES ${LIB_SAXBOSPIRAL_RENDER_BACKENDS_HEADERS}
DESTINATION include/saxbospiral/render_backends
DESTINATION "include/${LIBSAXBOSPIRAL_PRECISE_HEADER_DESTINATION}/render_backends"
)

enable_testing()
Expand Down

0 comments on commit 58ff5ee

Please sign in to comment.