Created
November 4, 2021 07:48
-
-
Save edalorzo/d14855aee2ff6f53f753e9de6c38187e to your computer and use it in GitHub Desktop.
Configure PDCurses with CMake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.20) | |
project(MyProject) | |
set(CMAKE_CXX_STANDARD 20) | |
set(CURSES_LIBRARIES "libs") | |
include_directories("include") | |
link_directories("${CMAKE_SOURCE_DIR}/lib") | |
find_library(PDCURSES NAMES "pdcurses" HINTS "${CMAKE_SOURCE_DIR}/lib") | |
add_executable(MyProject main.cpp) | |
target_link_libraries(MyProject PDCURSES) | |
add_custom_command(TARGET MyProject POST_BUILD | |
COMMAND ${CMAKE_COMMAND} -E copy_if_different | |
"${PROJECT_SOURCE_DIR}/pdcurses.dll" | |
$<TARGET_FILE_DIR:MyProject>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment