mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[CMake] need COMPATSRC for static targets #2454
This commit is contained in:
parent
b77dedd791
commit
d25c9a297c
@ -211,9 +211,9 @@ file(GLOB COMPATSRC CONFIGURE_DEPENDS src/compat/*.c)
|
|||||||
file(GLOB NCCORESRCS CONFIGURE_DEPENDS src/lib/*.c src/lib/*.cpp)
|
file(GLOB NCCORESRCS CONFIGURE_DEPENDS src/lib/*.c src/lib/*.cpp)
|
||||||
add_library(notcurses-core SHARED ${NCCORESRCS} ${COMPATSRC})
|
add_library(notcurses-core SHARED ${NCCORESRCS} ${COMPATSRC})
|
||||||
if(${USE_STATIC})
|
if(${USE_STATIC})
|
||||||
add_library(notcurses-core-static STATIC ${NCCORESRCS})
|
add_library(notcurses-core-static STATIC ${NCCORESRCS} ${COMPATSRC})
|
||||||
else()
|
else()
|
||||||
add_library(notcurses-core-static STATIC EXCLUDE_FROM_ALL ${NCCORESRCS})
|
add_library(notcurses-core-static STATIC EXCLUDE_FROM_ALL ${NCCORESRCS} ${COMPATSRC})
|
||||||
endif()
|
endif()
|
||||||
# don't want these on freebsd/dragonfly/osx
|
# don't want these on freebsd/dragonfly/osx
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
@ -266,7 +266,6 @@ target_link_libraries(notcurses-core
|
|||||||
"${ZLIB_LIBRARIES}"
|
"${ZLIB_LIBRARIES}"
|
||||||
"${TERMINFO_LIBRARIES}"
|
"${TERMINFO_LIBRARIES}"
|
||||||
"${LIBM}"
|
"${LIBM}"
|
||||||
"${LIBRT}"
|
|
||||||
"${unistring}"
|
"${unistring}"
|
||||||
"${gpm}"
|
"${gpm}"
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@ -279,10 +278,8 @@ target_link_libraries(notcurses-core-static
|
|||||||
"${ZLIB_STATIC_LIBRARIES}"
|
"${ZLIB_STATIC_LIBRARIES}"
|
||||||
"${TERMINFO_STATIC_LIBRARIES}"
|
"${TERMINFO_STATIC_LIBRARIES}"
|
||||||
"${LIBM}"
|
"${LIBM}"
|
||||||
"${LIBRT}"
|
|
||||||
"${unistring}"
|
"${unistring}"
|
||||||
"${gpm}"
|
"${gpm}"
|
||||||
PUBLIC
|
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
"${LIBRT_LIBRARIES}"
|
"${LIBRT_LIBRARIES}"
|
||||||
)
|
)
|
||||||
@ -308,9 +305,9 @@ endif()
|
|||||||
file(GLOB NCSRCS CONFIGURE_DEPENDS src/media/*.c src/media/*.cpp)
|
file(GLOB NCSRCS CONFIGURE_DEPENDS src/media/*.c src/media/*.cpp)
|
||||||
add_library(notcurses SHARED ${NCSRCS} ${COMPATSRC})
|
add_library(notcurses SHARED ${NCSRCS} ${COMPATSRC})
|
||||||
if(${USE_STATIC})
|
if(${USE_STATIC})
|
||||||
add_library(notcurses-static STATIC ${NCSRCS})
|
add_library(notcurses-static STATIC ${NCSRCS} ${COMPATSRC})
|
||||||
else()
|
else()
|
||||||
add_library(notcurses-static STATIC EXCLUDE_FROM_ALL ${NCSRCS})
|
add_library(notcurses-static STATIC EXCLUDE_FROM_ALL ${NCSRCS} ${COMPATSRC})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(notcurses PROPERTIES
|
set_target_properties(notcurses PROPERTIES
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user