Initial import

This commit is contained in:
2021-04-15 13:31:30 -04:00
parent f0a260bd82
commit b127690a48
6 changed files with 107 additions and 0 deletions

35
CMakeLists.txt Normal file
View File

@@ -0,0 +1,35 @@
cmake_minimum_required (VERSION 2.8.12)
project (mazemaker)
set(CMAKE_C_FLAGS "-Wall -O2 -g")
set (VERSION_MAJOR 0)
set (VERSION_MINOR 1)
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
find_package(PkgConfig REQUIRED)
pkg_search_module(POPT REQUIRED popt)
include_directories("${PROJECT_BINARY_DIR}")
file(GLOB_RECURSE SOURCES src/*.c src/*.h)
add_executable (mazemaker ${SOURCES})
install (TARGETS mazemaker DESTINATION bin)
target_link_libraries(mazemaker PUBLIC ${POPT_LIBRARIES})
target_include_directories(mazemaker PUBLIC ${POPT_INCLUDE_DIRS})
target_compile_options(mazemaker PUBLIC ${POPT_CFLAGS_OTHER})
target_link_options(mazemaker PUBLIC ${POPT_LDFLAGS_OTHER})
set(
CPACK_SOURCE_PACKAGE_FILE_NAME
"mazemaker-${VERSION_MAJOR}.${VERSION_MINOR}"
CACHE INTERNAL "tarball basename"
)
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;~$;/CMakeFiles/;*.cmake;*.tar.gz;${CPACK_SOURCE_IGNORE_FILES}")
include (CPack)