mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-29 21:37:32 +00:00
Update all makefiles for linux to use (by include) a common base makefile as well as common makefiles for X and sdl. These included makefiles have the name linux-*.mk. Updated all linux makefiles to use the libbsd-overlay package, using pkg-config to set the appropriate flags. Updated CMakelists to also use the libbsd-overlay package via pkgconfig for Linux only. Finally added install targets to the CMakelists file so that cmake --install . will place the lde binaries into the appropriate directory in maiko as the makefiles currently do.
This commit is contained in:
@@ -36,9 +36,10 @@ IF(NEED_LIB_M)
|
||||
SET(MAIKO_LIBRARIES m)
|
||||
ENDIF()
|
||||
|
||||
CHECK_LIBRARY_EXISTS(bsd strlcat "" NEED_LIB_BSD)
|
||||
IF(NEED_LIB_BSD)
|
||||
SET(MAIKO_LIBRARIES ${MAIKO_LIBRARIES} bsd)
|
||||
IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBBSD-OVERLAY REQUIRED IMPORTED_TARGET "libbsd-overlay")
|
||||
SET(MAIKO_LIBRARIES ${MAIKO_LIBRARIES} PkgConfig::LIBBSD-OVERLAY)
|
||||
ENDIF()
|
||||
|
||||
SET (MAIKO_RELEASE 351 CACHE STRING "Release version to build. Release: 115, 200, 201, 210, 300, 350, 351")
|
||||
@@ -533,3 +534,21 @@ TARGET_INCLUDE_DIRECTORIES(setsout PRIVATE inc)
|
||||
ADD_EXECUTABLE(tstsout src/tstsout.c src/byteswap.c)
|
||||
TARGET_COMPILE_DEFINITIONS(tstsout PRIVATE ${MAIKO_DEFINITIONS})
|
||||
TARGET_INCLUDE_DIRECTORIES(tstsout PRIVATE inc)
|
||||
|
||||
# Installation Targets
|
||||
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/../" CACHE PATH "Installation prefix" FORCE)
|
||||
ENDIF()
|
||||
execute_process(
|
||||
COMMAND sh -c "echo $(../bin/osversion).$(../bin/machinetype)"
|
||||
OUTPUT_VARIABLE release_dir
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
INSTALL(TARGETS lde DESTINATION ${release_dir})
|
||||
IF(MAIKO_DISPLAY_X11)
|
||||
INSTALL(TARGETS ldex ldeinit DESTINATION ${release_dir})
|
||||
ENDIF()
|
||||
IF(MAIKO_DISPLAY_SDL)
|
||||
INSTALL(TARGETS ldesdl DESTINATION ${release_dir})
|
||||
ENDIF()
|
||||
|
||||
Reference in New Issue
Block a user