woof/WoofInstall.cmake.in
Alex Mayfield b13b8fc415
CMake Build System (#48)
* First stab at CMake

It builds on Linux, and cross-compiles to Windows as well using the
provided toolchain files.  convert-icon is also fixed up with argument
count checking and modern format strings, along with all flake8 warnings
fixed.

* Fix Visual Studio compilation

* Add a newline to gitignore

* Build system updates

- Add documentation.
- Add options for defines.
- Automatically copy DLL files to binary directory.
- Add preliminary CPack support which packages the binary plus docs and
  DLL files.

* Fix SDL2_FILES conditional

* Build Windows and Linux packages

We use our own Python script instead of unix2dos.  Also, a few other
random fixes came along for the ride.

* Fix up warnings and defines on MSVC

* Update Travis to use CMake

* Remove automake and autoconf files

* Yet more build system updates

- Add docs, examples, and desktop stuff to binary packages.
- Get rid of HAVE_CONFIG_H.
- Change HAVE_DLOPEN to something more CMake-like.
- Add optional targets for most of the tools.

* Ignore files for source package

* Add to README file

* Get rid of BETA, DOGS, and fix another Automake straggler

* Prevent in-tree builds

Fixes #21
2020-02-03 12:11:31 +01:00

25 lines
829 B
CMake

# This script is stamped out by CMake and run by `make install`.
set(PROJECT_SOURCE_DIR "@PROJECT_SOURCE_DIR@")
set(PROJECT_BINARY_DIR "@PROJECT_BINARY_DIR@")
set(Python3_EXECUTABLE "@Python3_EXECUTABLE@")
set(WIN32 "@WIN32@")
function(win_textfile SOURCE DESTINATION)
execute_process(COMMAND
"${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/win-textfile"
"${SOURCE}" "${DESTINATION}")
endfunction()
if(WIN32)
if(NOT Python3_EXECUTABLE)
message(FATAL_ERROR "Python 3 not found, can't run install scripts.")
endif()
# Convert text files to a format Windows Notepad can read without issue.
win_textfile(
"${PROJECT_SOURCE_DIR}/COPYING" "${PROJECT_BINARY_DIR}/COPYING.txt")
win_textfile(
"${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_BINARY_DIR}/README.txt")
endif()