tibia-client/CMakeLists.txt

47 lines
1.3 KiB
CMake
Raw Normal View History

2010-11-08 23:04:33 +01:00
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(otclient)
ADD_DEFINITIONS(-DFW_WINDOW)
INCLUDE(src/framework/CMakeLists.txt)
INCLUDE(src/otclient/CMakeLists.txt)
# functions map for reading backtraces
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=otclient.map")
OPTION(USE_PCH "Use precompiled header (speed up compile)" OFF)
2011-08-14 04:09:11 +02:00
SET(executable_SOURCES
src/main.cpp
)
# add executable icon for win32 platforms
IF(WIN32)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
2011-11-17 03:53:17 +01:00
COMMAND ${CMAKE_RC_COMPILER}
-I${CMAKE_CURRENT_SOURCE_DIR}/src
-i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o)
2011-12-05 19:27:07 +01:00
SET(executable_SOURCES ${executable_SOURCES} otcicon.o)
ENDIF(WIN32)
# add otclient executable
2011-12-05 19:27:07 +01:00
ADD_EXECUTABLE(otclient ${framework_SOURCES} ${otclient_SOURCES} ${executable_SOURCES})
# target link libraries
2011-12-05 19:27:07 +01:00
TARGET_LINK_LIBRARIES(otclient ${framework_LIBRARIES})
2011-08-14 04:09:11 +02:00
IF(USE_PCH)
include(cotire)
cotire(otclient)
MESSAGE(STATUS "Use precompiled header: ON")
ELSE()
MESSAGE(STATUS "Use precompiled header: OFF")
ENDIF()
2011-05-16 22:59:34 +02:00
# installation
SET(DATA_INSTALL_DIR share/otclient)
INSTALL(TARGETS otclient RUNTIME DESTINATION bin)
2011-10-30 21:11:43 +01:00
INSTALL(DIRECTORY modules DESTINATION ${DATA_INSTALL_DIR}
PATTERN ".git" EXCLUDE)