summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df39c7c9..c81873fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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})