Skip to content

Commit

Permalink
bring up to speed with current master
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Dec 29, 2024
2 parents 39700bf + ded1195 commit 83e6a0a
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -585,11 +585,21 @@ target_compile_options(notcurses-static
-fPIE
)

file(GLOB NOTCURSES_HEADERS
CONFIGURE_DEPENDS
LIST_DIRECTORIES false
${PROJECT_SOURCE_DIR}/include/notcurses/*.h
${CMAKE_CURRENT_BINARY_DIR}/include/version.h)
target_compile_options(notcurses++-static
PRIVATE
${NCPP_COMPILE_OPTIONS}
-fPIE
)

target_compile_definitions(notcurses++
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)

target_compile_definitions(notcurses++-static
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)

file(GLOB NCPP_HEADERS
CONFIGURE_DEPENDS
Expand All @@ -601,11 +611,17 @@ file(GLOB NCPP_INTERNAL_HEADERS
LIST_DIRECTORIES false
${PROJECT_SOURCE_DIR}/include/ncpp/internal/*.hh)

install(FILES ${NCPP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp)
install(FILES ${NCPP_INTERNAL_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp/internal)

export(PACKAGE notcurses)

file(GLOB NOTCURSES_HEADERS
CONFIGURE_DEPENDS
LIST_DIRECTORIES false
${PROJECT_SOURCE_DIR}/include/notcurses/*.h
${CMAKE_CURRENT_BINARY_DIR}/include/version.h)
install(FILES ${NOTCURSES_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/notcurses)
install(FILES ${NCPP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp)
install(FILES ${NCPP_INTERNAL_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp/internal)

# tiny proofs of concept, one binary per source file
if(USE_POC)
Expand Down Expand Up @@ -1024,11 +1040,12 @@ configure_file(tools/notcurses-ffi.pc.in
@ONLY
)
endif()
configure_file(tools/notcurses++.pc.in
if(${USE_CXX})
configure_file(tools/notcurses++.pc.in
${CMAKE_CURRENT_BINARY_DIR}/notcurses++.pc
@ONLY
)

endif()
include(CMakePackageConfigHelpers)
configure_file(tools/version.h.in include/version.h)
configure_file(tools/builddef.h.in include/builddef.h)
Expand All @@ -1053,6 +1070,7 @@ write_basic_package_version_file(
COMPATIBILITY SameMajorVersion
)

if(${USE_CXX})
configure_package_config_file(tools/Notcurses++Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/Notcurses++Config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Notcurses++
Expand All @@ -1062,6 +1080,7 @@ write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/Notcurses++ConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
endif()

# Installation
install(FILES
Expand All @@ -1076,11 +1095,13 @@ install(FILES
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Notcurses"
)

if(${USE_CXX})
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/Notcurses++Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/Notcurses++ConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Notcurses++"
)
endif()

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/notcurses-core.pc
Expand All @@ -1099,10 +1120,12 @@ install(FILES
)
endif()

if(${USE_CXX})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/notcurses++.pc
DESTINATION ${PKGCONFIG_DIR}
)
endif()

if(NOT ${USE_MULTIMEDIA} STREQUAL "none")
file(GLOB TESTDATA CONFIGURE_DEPENDS data/*)
Expand Down

0 comments on commit 83e6a0a

Please sign in to comment.