You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PDCursesMod/cmake
Yurii Nakonechnyi b487f456a9
Update build_dependencies.cmake - fixed cmake warning (#317)
This commit fixes CMake warning: logical block: `IF (PDC_WIDE OR PDC_UTF8 OR PDC_GL_BUILD)` was closed with: `ENDIF (PDC_WIDE OR PDC_UTF8)` block with mis-matching arguments.
8 months ago
..
sdl2_ttf Enable full Unicode range in SDL2 port (#270) 2 years ago
README.md add dosvga project to travis build for 16 and 32-bit DOS 5 years ago
build_dependencies.cmake Update build_dependencies.cmake - fixed cmake warning (#317) 8 months ago
build_options.cmake Fix build for CI 2 years ago
dll_version.cmake Followed wcbrine lead in removal of pdcurses.ico 5 years ago
gen_config_header.cmake remove CHTYPE_16 from cmake 5 years ago
get_version.cmake CMake tested on Windows, and Linux 6 years ago
make_uninstall.cmake CMake tested on Windows, and Linux 6 years ago
project_common.cmake It's PDC_FORCE_UTF8 for make and nmake, but PDC_UTF8 for CMake. 2 years ago
resource.in.cmake CMake tested on Windows, and Linux 6 years ago
target_arch.cmake CMake tested on Windows, and Linux 6 years ago
version.in.cmake Removed reference to icon from cmake/version.in.cmake 5 years ago
watcom_open_dos16_toolchain.cmake Minor correction for consistency 5 years ago
watcom_open_dos32_toolchain.cmake Minor correction for consistency 5 years ago
watcom_open_os2v2_toolchain.cmake Minor correction for consistency 5 years ago
watcom_open_win32_toolchain.cmake travis add WINCON and WINGUI project build for Open Watcom compilers 5 years ago

README.md

CMake Options

option(PDC_BUILD_SHARED "Build dynamic libs for pdcurses" ON)
option(PDC_UTF8 "Force to UTF8" OFF)
option(PDC_WIDE "Wide - pulls in sdl-ttf" OFF)
option(PDCDEBUG "Debug tracing" OFF)
option(PDC_CHTYPE_32 "CHTYPE_32" OFF)
option(PDC_DOS_BUILD "Build DOS Project" OFF)
option(PDC_DOSVGA_BUILD "Build DOSVGA Project" OFF)
option(PDC_SDL2_BUILD "Build SDL2 Project" ON)
option(PDC_SDL2_DEPS_BUILD "Build SDL2 and dependencies" ON)

To override the default option value, use the "-DBUILD_SDL2=ON" scheme. If you set it once, CMake caches the value.

When using pre-built SDL2 bits, simply set these two variables when invoking cmake the first time.

    -DSDL2_INCLUDE_DIR=/my/path/to/sdl2/include/SDL2
    -DSDL2_LIBRARY_DIR=/my/path/to/sdl2/lib/folder

Appveyor

Upon cmake branch check-ins, Appveyor will build the following variants: wide/utf8 - Release/Debug, Visual Studio 2015 - amd64_x86/amd64/amd64_arm wide/utf8 - Release/Debug, Visual Studio 2017 - amd64_x86/amd64/amd64_arm/amd64_arm64

^There is currently a SDL2 bug preventing MinSizeRel builds: https://bugzilla.libsdl.org/show_bug.cgi?id=4233

Native Windows Building

Win32 (pdcurses.sln)

mkdir build32 & pushd build32
    cmake -G"Visual Studio 15" -DPDC_WIDE=ON -DCMAKE_INSTALL_PREFIX=c:\tmp\pdcurses\Win32 -DCMAKE_BUILD_TYPE=Debug -DPDCDEBUG=ON ..
    popd
    cmake --build build32 --config Debug --target install

Win64 (pdcurses.sln)

mkdir build64 & pushd build64
    cmake -G"Visual Studio 15 Win64" -DPDC_WIDE=ON -DCMAKE_INSTALL_PREFIX=c:\tmp\pdcurses\Win64 -DCMAKE_BUILD_TYPE=Debug -DPDCDEBUG=ON ..
    popd
    cmake --build build64 --config Debug --target install

Cygwin

mkdir build && pushd build
cmake .. -G"Unix Makefiles" -DPDC_SDL2_BUILD=OFF -DCMAKE_INSTALL_PREFIX=/cygdrive/c/tmp/pdcurses/Cyg64 -DCMAKE_BUILD_TYPE=Debug -DPDCDEBUG=ON -DWINDOWS_KIT_LIBRARY_DIR=/cygdrive/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Lib/10.0.14393.0/um/x64 ..
popd
    cmake --build build --config Debug --target install

Note: The demo apps will all build, only version.exe works. All other apps print "Redirection is not supported."

Linux Building

SDL2 (Currently the only project supported with CMake)

cmake .. -DPDC_WIDE=ON -DCMAKE_INSTALL_PREFIX=/home/joel/pdcurses/out -DCMAKE_BUILD_TYPE=Debug -GNinja
autoninja install