mirror of https://github.com/mgba-emu/mgba.git
CMake: Fix flags.h generation
This commit is contained in:
parent
87791b9db9
commit
727fcb94aa
|
@ -155,8 +155,6 @@ add_custom_target(version-info ALL
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/flags.h.in ${CMAKE_CURRENT_BINARY_DIR}/flags.h)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/flags.h DESTINATION include/mgba COMPONENT lib${BINARY_NAME})
|
|
||||||
|
|
||||||
list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
||||||
source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
||||||
|
@ -200,6 +198,7 @@ if(WIN32)
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||||
endif()
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
|
set(USE_PTHREADS ON)
|
||||||
add_definitions(-DUSE_PTHREADS)
|
add_definitions(-DUSE_PTHREADS)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
@ -844,6 +843,10 @@ if(BUILD_EXAMPLE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message(STATUS ${USE_PTHREADS})
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/flags.h.in ${CMAKE_CURRENT_BINARY_DIR}/flags.h)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/flags.h DESTINATION include/mgba COMPONENT lib${BINARY_NAME})
|
||||||
|
|
||||||
# Packaging
|
# Packaging
|
||||||
set(CPACK_PACKAGE_VERSION ${VERSION_STRING})
|
set(CPACK_PACKAGE_VERSION ${VERSION_STRING})
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LIB_VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${LIB_VERSION_MAJOR})
|
||||||
|
|
Loading…
Reference in New Issue