And the Android cmake file as well.

This commit is contained in:
Unknown W. Brackets 2013-03-02 12:41:39 -08:00
parent fc48fdbd97
commit aadc7db33d

View File

@ -85,6 +85,7 @@ set(SRCS
PSPMixer.cpp
System.cpp
Core.cpp
../git-version.cpp
)
if(ARM)
@ -115,6 +116,17 @@ add_library(core STATIC ${SRCS})
target_link_libraries(core general common)
target_link_libraries(core general base)
# Generate git-version.cpp at build time.
add_custom_target(GitVersion ALL
DEPENDS something_that_never_exists)
add_custom_command(OUTPUT something_that_never_exists
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/..
-P ${CMAKE_CURRENT_SOURCE_DIR}/../git-version.cmake)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/../git-version.cpp
PROPERTIES GENERATED TRUE)
add_dependencies(core GitVersion)
if(UNIX)
add_definitions(-fPIC)
add_definitions(-std=gnu++0x)