Browse Source

Fixes in CMake for building snapshots

Eduardo Bart 5 years ago
parent
commit
aa924dc348
1 changed files with 3 additions and 15 deletions
  1. 3
    15
      CMakeLists.txt

+ 3
- 15
CMakeLists.txt View File

@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6)
2 2
 project(otclient)
3 3
 
4 4
 set(VERSION "0.6.6")
5
-set(LIB_NAME "otc_framework")
6 5
 
7 6
 option(FRAMEWORK_SOUND "Use SOUND " ON)
8 7
 option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
@@ -36,20 +35,9 @@ endif()
36 35
 
37 36
 add_definitions(-D"VERSION=\\"${VERSION}\\"")
38 37
 
39
-# we want framework to be a library for faster compilation/linking
40
-if(USE_STATIC_LIBS)
41
-    add_library(${LIB_NAME} ${framework_SOURCES})
42
-else()
43
-    add_library(${LIB_NAME} SHARED ${framework_SOURCES})
44
-    message(STATUS "Linking to shared ${LIB_NAME}, make sure you copy the DLL/SO/dylib with the executable!")
45
-endif()
46
-target_link_libraries(${LIB_NAME} ${framework_LIBRARIES})
47
-
48 38
 # add client executable
49
-add_executable(${PROJECT_NAME} ${client_SOURCES} ${executable_SOURCES})
50
-
51
-# target link libraries
52
-target_link_libraries(${PROJECT_NAME} ${LIB_NAME})
39
+add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
40
+target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
53 41
 
54 42
 if(USE_PCH)
55 43
     include(cotire)
@@ -61,7 +49,7 @@ endif()
61 49
 
62 50
 # installation
63 51
 set(DATA_INSTALL_DIR share/${PROJECT_NAME})
64
-install(TARGETS ${PROJECT_NAME} ${LIB_NAME}
52
+install(TARGETS ${PROJECT_NAME}
65 53
 		RUNTIME DESTINATION bin
66 54
 		LIBRARY DESTINATION lib
67 55
 		ARCHIVE DESTINATION lib)

Loading…
Cancel
Save