Cmake version for hash

This commit is contained in:
Filip Gawin 2021-02-12 02:04:31 +01:00 committed by erorcun
commit 1b8d03f3aa
10 changed files with 348 additions and 13 deletions

View file

@ -1,5 +1,5 @@
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(THREADS_PREFER_PTHREAD_FLAG ON)
file(GLOB_RECURSE ${PROJECT}_SOURCES "*.cpp" "*.h" "*.rc")
@ -17,6 +17,9 @@ endfunction()
header_directories(${PROJECT}_INCLUDES)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/extras/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp" @ONLY)
list(APPEND ${PROJECT}_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp")
add_executable(${EXECUTABLE} WIN32
${${PROJECT}_SOURCES}
)
@ -46,6 +49,8 @@ if(LIBRW_PLATFORM_D3D9)
)
endif()
target_compile_definitions(${EXECUTABLE} PRIVATE CMAKE_BUILD)
if(${PROJECT}_AUDIO STREQUAL "OAL")
find_package(OpenAL REQUIRED)
target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})