Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ else()

endif()

install(FILES curses.h panel.h DESTINATION ${CMAKE_BUILD_TYPE}/include)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think those should be in subdirectory pdcurses along with installing term.h and this should also install pdcurses.h as a wrapper with the appropriate defines and including the pdcurses/curses.h - see https://github.com/msys2/MINGW-packages/blob/86e9985a9bccf10920d28741e91394ba44741986/mingw-w64-pdcurses/PKGBUILD#L109-L116


add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_SOURCE_DIR}/cmake/make_uninstall.cmake")

set(CPACK_COMPONENTS_ALL applications)
11 changes: 11 additions & 0 deletions cmake/project_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ if(PDC_BUILD_SHARED)
set_target_properties(${PDCURSE_PROJ} PROPERTIES MACOSX_RPATH 1)
endif()

if(APPLE OR UNIX)
target_compile_definitions(${PDCURSE_PROJ} PRIVATE PDC_ENABLE_VISIBILITY)
set_target_properties(${PDCURSE_PROJ} PROPERTIES C_VISIBILITY_PRESET hidden)
endif()

if(${PROJECT_NAME} STREQUAL "sdl2")
if(PDC_WIDE OR PDC_UTF8)
target_link_libraries(${PDCURSE_PROJ} ${EXTRA_LIBS}
Expand Down Expand Up @@ -130,5 +135,11 @@ macro (demo_app dir targ)
add_dependencies(${bin_name} ${PDCURSE_PROJ})
set_target_properties(${bin_name} PROPERTIES OUTPUT_NAME ${targ})

if(APPLE)
set_target_properties(${bin_name} PROPERTIES INSTALL_RPATH "@executable_path/../../lib/${PROJECT_NAME}")
elseif(UNIX)
set_target_properties(${bin_name} PROPERTIES INSTALL_RPATH "$ORIGIN/../../lib/${PROJECT_NAME}")
endif()

install(TARGETS ${bin_name} RUNTIME DESTINATION ${PDCURSES_DIST}/bin/${PROJECT_NAME} COMPONENT applications)
endmacro ()
6 changes: 5 additions & 1 deletion curses.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ typedef struct _screen SCREEN;
# define PDCEX __declspec(dllimport) extern
# endif
#else
# define PDCEX extern
# ifdef PDC_ENABLE_VISIBILITY
# define PDCEX __attribute__((visibility("default"))) extern
# else
# define PDCEX extern
# endif
Comment on lines +401 to +405
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be moved out to a separate PR

#endif

PDCEX int LINES; /* terminal height */
Expand Down