Starting to create CMakeLists to android

This commit is contained in:
Tulioh
2014-12-18 00:31:28 -02:00
parent 5ada7eb5ec
commit 997daa2d49
10 changed files with 108 additions and 8 deletions

View File

@@ -19,10 +19,6 @@ endif()
option(USE_PCH "Use precompiled header (speed up compile)" OFF)
set(executable_SOURCES
src/main.cpp
)
# add executable icon for win32 platforms
if(WIN32)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
@@ -35,8 +31,23 @@ endif()
add_definitions(-D"VERSION=\\"${VERSION}\\"")
# add client executable
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
if(NOT __ANDROID__)
set(executable_SOURCES
src/android.cpp
src/main.cpp
)
# add shared library for android
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
else()
set(executable_SOURCES
src/main.cpp
)
# add client executable
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
endif()
target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
if(USE_PCH)