From a31bb00e211a2b9206e97196018e5f44e0387167 Mon Sep 17 00:00:00 2001 From: dhewg Date: Tue, 3 Jul 2012 19:26:41 +0200 Subject: [PATCH] Rename game libraries to the game name Never use "game" as library name, use the game name instead. This allows d3xp/mods to coexist in a single (installation-)directory. This paves the way for future `make install` or binary installers. Additionally, the "mods" menu entry works from within the game gui. --- CMakeLists.txt | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 337c5a6..511d9b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,6 @@ cmake_minimum_required(VERSION 2.6) # osx: place game .dylib's in the bundle (next to the binary) # osx: -weak_framework ? -# how to name the game .so's? - # maybe add these as options: # BUILD_GAMEPAK # TARGET_MONO @@ -27,7 +25,7 @@ include(CheckCXXCompilerFlag) include(CheckFunctionExists) option(CORE "Build the core" ON) -option(GAME "Build the base game code" ON) +option(BASE "Build the base game code" ON) option(D3XP "Build the d3xp game code" OFF) option(DEDICATED "Build the dedicated server" OFF) option(X86 "Cross compile for x86 (only applicable on x86_64)" OFF) @@ -765,14 +763,14 @@ if (DEDICATED) ) endif() -if (GAME) - add_library(game SHARED ${src_game}) - set_target_properties(game PROPERTIES PREFIX "") - set_target_properties(game PROPERTIES COMPILE_DEFINITIONS "GAME_DLL") - set_target_properties(game PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/game") - set_target_properties(game PROPERTIES LINK_FLAGS "${ldflags}") - set_target_properties(game PROPERTIES INSTALL_NAME_DIR "@executable_path") - target_link_libraries(game idlib) +if (BASE) + add_library(base SHARED ${src_game}) + set_target_properties(base PROPERTIES PREFIX "") + set_target_properties(base PROPERTIES COMPILE_DEFINITIONS "GAME_DLL") + set_target_properties(base PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/game") + set_target_properties(base PROPERTIES LINK_FLAGS "${ldflags}") + set_target_properties(base PROPERTIES INSTALL_NAME_DIR "@executable_path") + target_link_libraries(base idlib) endif() if (D3XP)