Compare commits

...

3 Commits

Author SHA1 Message Date
Sandy Carter
907dc5fbd7 Export bimg_encode and bimg_decode 2023-02-11 09:44:45 -05:00
Sandy Carter
a0f928864f version: remove newline from version number 2023-02-11 09:44:28 -05:00
Francis Hart
fad617f66f Ensure BX_DIR is converted to cmake style path
When using the BX_DIR, BIMG_DIR, and BGFX_DIR options to cmake, the
pathnames need to be converted to cmake style path. This ensures the
paths do not have mixed directory separators later on in the build,
which can cause build failures.
2023-02-11 09:44:13 -05:00
2 changed files with 6 additions and 2 deletions

View File

@@ -94,6 +94,10 @@ elseif(NOT IS_ABSOLUTE "${BGFX_DIR}")
get_filename_component(BGFX_DIR "${BGFX_DIR}" REALPATH BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
file(TO_CMAKE_PATH "${BX_DIR}" BX_DIR)
file(TO_CMAKE_PATH "${BIMG_DIR}" BIMG_DIR)
file(TO_CMAKE_PATH "${BGFX_DIR}" BGFX_DIR)
# sets project version from api ver / git rev
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.cmake)
if(BGFX_BUILD_TOOLS AND BGFX_CUSTOM_TARGETS)
@@ -165,7 +169,7 @@ if(BGFX_INSTALL)
)
if(NOT BGFX_LIBRARY_TYPE MATCHES "SHARED")
install(
TARGETS bimg bx
TARGETS bx bimg bimg_encode bimg_decode
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"

View File

@@ -23,7 +23,7 @@ execute_process(
COMMAND "${GIT_EXECUTABLE}" -C bgfx rev-list --count HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REV_COUNT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
)
# read version(100) from bgfx.idl