From aa924dc348c2c10aa8c60062188533926e0ca837 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 5 Nov 2014 11:25:11 -0200 Subject: [PATCH] Fixes in CMake for building snapshots --- CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c736db7c..095ab291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6) project(otclient) set(VERSION "0.6.6") -set(LIB_NAME "otc_framework") option(FRAMEWORK_SOUND "Use SOUND " ON) option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON) @@ -36,20 +35,9 @@ endif() add_definitions(-D"VERSION=\\"${VERSION}\\"") -# we want framework to be a library for faster compilation/linking -if(USE_STATIC_LIBS) - add_library(${LIB_NAME} ${framework_SOURCES}) -else() - add_library(${LIB_NAME} SHARED ${framework_SOURCES}) - message(STATUS "Linking to shared ${LIB_NAME}, make sure you copy the DLL/SO/dylib with the executable!") -endif() -target_link_libraries(${LIB_NAME} ${framework_LIBRARIES}) - # add client executable -add_executable(${PROJECT_NAME} ${client_SOURCES} ${executable_SOURCES}) - -# target link libraries -target_link_libraries(${PROJECT_NAME} ${LIB_NAME}) +add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES}) +target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES}) if(USE_PCH) include(cotire) @@ -61,7 +49,7 @@ endif() # installation set(DATA_INSTALL_DIR share/${PROJECT_NAME}) -install(TARGETS ${PROJECT_NAME} ${LIB_NAME} +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)