mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
CMake: clean up defines a little
This commit is contained in:
parent
463f5acd6a
commit
929992c881
@ -205,15 +205,15 @@ endif()
|
|||||||
|
|
||||||
target_compile_definitions(notcurses
|
target_compile_definitions(notcurses
|
||||||
PUBLIC
|
PUBLIC
|
||||||
_XOPEN_SOURCE # wcwidth(3) requires _XOPEN_SOURCE, and is in our headers
|
_POSIX_C_SOURCE=200809L _XOPEN_SOURCE=500 # wcwidth(3) requires _XOPEN_SOURCE, and is in our headers
|
||||||
PRIVATE
|
PRIVATE
|
||||||
_GNU_SOURCE SOURCE_DEFAULT
|
_GNU_SOURCE _DEFAULT_SOURCE
|
||||||
)
|
)
|
||||||
target_compile_definitions(notcurses-static
|
target_compile_definitions(notcurses-static
|
||||||
PUBLIC
|
PUBLIC
|
||||||
_XOPEN_SOURCE # wcwidth(3) requires _XOPEN_SOURCE, and is in our headers
|
_POSIX_C_SOURCE=200809L _XOPEN_SOURCE=500 # wcwidth(3) requires _XOPEN_SOURCE, and is in our headers
|
||||||
PRIVATE
|
PRIVATE
|
||||||
_GNU_SOURCE SOURCE_DEFAULT
|
_GNU_SOURCE _DEFAULT_SOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
# libnotcurses++
|
# libnotcurses++
|
||||||
@ -286,10 +286,7 @@ set(NCPP_COMPILE_OPTIONS
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(NCPP_COMPILE_DEFINITIONS_PUBLIC
|
set(NCPP_COMPILE_DEFINITIONS_PUBLIC
|
||||||
_GNU_SOURCE SOURCE_DEFAULT
|
_GNU_SOURCE _DEFAULT_SOURCE
|
||||||
)
|
|
||||||
set(NCPP_COMPILE_DEFINITIONS_PRIVATE
|
|
||||||
_XOPEN_SOURCE # wcwidth(3) requires _XOPEN_SOURCE, and is in our headers
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_options(notcurses++
|
target_compile_options(notcurses++
|
||||||
@ -305,15 +302,11 @@ target_compile_options(notcurses++-static
|
|||||||
target_compile_definitions(notcurses++
|
target_compile_definitions(notcurses++
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
|
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
|
||||||
PRIVATE
|
|
||||||
${NCPP_COMPILE_DEFINITIONS_PRIVATE}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(notcurses++-static
|
target_compile_definitions(notcurses++-static
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
|
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
|
||||||
PRIVATE
|
|
||||||
${NCPP_COMPILE_DEFINITIONS_PRIVATE}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB NOTCURSES_HEADERS
|
file(GLOB NOTCURSES_HEADERS
|
||||||
@ -340,6 +333,10 @@ install(FILES ${NCPP_INTERNAL_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/n
|
|||||||
# notcurses-demo
|
# notcurses-demo
|
||||||
file(GLOB DEMOSRCS CONFIGURE_DEPENDS src/demo/*.c)
|
file(GLOB DEMOSRCS CONFIGURE_DEPENDS src/demo/*.c)
|
||||||
add_executable(notcurses-demo ${DEMOSRCS})
|
add_executable(notcurses-demo ${DEMOSRCS})
|
||||||
|
target_compile_definitions(notcurses-demo
|
||||||
|
PRIVATE
|
||||||
|
_GNU_SOURCE
|
||||||
|
)
|
||||||
target_include_directories(notcurses-demo
|
target_include_directories(notcurses-demo
|
||||||
PRIVATE
|
PRIVATE
|
||||||
include
|
include
|
||||||
@ -355,10 +352,6 @@ target_link_libraries(notcurses-demo
|
|||||||
notcurses
|
notcurses
|
||||||
${MATH_LIBRARIES}
|
${MATH_LIBRARIES}
|
||||||
)
|
)
|
||||||
target_compile_definitions(notcurses-demo
|
|
||||||
PRIVATE
|
|
||||||
_GNU_SOURCE
|
|
||||||
)
|
|
||||||
|
|
||||||
# tiny proofs of concept, one binary per source file
|
# tiny proofs of concept, one binary per source file
|
||||||
file(GLOB POCSRCS CONFIGURE_DEPENDS src/poc/*.c src/poc/*.cpp)
|
file(GLOB POCSRCS CONFIGURE_DEPENDS src/poc/*.c src/poc/*.cpp)
|
||||||
@ -470,6 +463,7 @@ target_link_libraries(notcurses-ncreel
|
|||||||
notcurses++
|
notcurses++
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# notcurses-tetris
|
||||||
file(GLOB TETRISSRC CONFIGURE_DEPENDS src/tetris/*.cpp)
|
file(GLOB TETRISSRC CONFIGURE_DEPENDS src/tetris/*.cpp)
|
||||||
add_executable(notcurses-tetris ${TETRISSRC})
|
add_executable(notcurses-tetris ${TETRISSRC})
|
||||||
target_include_directories(notcurses-tetris
|
target_include_directories(notcurses-tetris
|
||||||
@ -509,9 +503,6 @@ target_link_libraries(notcurses-view
|
|||||||
"${AVUTIL_LIBRARIES}"
|
"${AVUTIL_LIBRARIES}"
|
||||||
"${SWSCALE_LIBRARIES}"
|
"${SWSCALE_LIBRARIES}"
|
||||||
)
|
)
|
||||||
target_compile_definitions(notcurses-view
|
|
||||||
PRIVATE
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user