From a13616e684403bc178d7444fe8ae9f2c7d56d658 Mon Sep 17 00:00:00 2001 From: MrOrdinaire Date: Sat, 3 Nov 2012 10:34:06 +0800 Subject: [PATCH] fix missing #include's and missing CMake linking directives --- base/PCMain.cpp | 1 + base/stringutil.h | 5 +++-- ext/etcpack/CMakeLists.txt | 2 +- ext/sha1/CMakeLists.txt | 2 +- ext/sha1/sha1.cpp | 2 +- ext/stb_image/CMakeLists.txt | 2 +- ext/stb_vorbis/CMakeLists.txt | 2 +- ext/vjson/CMakeLists.txt | 2 +- file/CMakeLists.txt | 1 + gfx/texture_gen.cpp | 3 ++- gfx_es2/CMakeLists.txt | 2 ++ ui/ui.cpp | 1 + 12 files changed, 16 insertions(+), 9 deletions(-) diff --git a/base/PCMain.cpp b/base/PCMain.cpp index 4fe1c9d37c..aea696da83 100644 --- a/base/PCMain.cpp +++ b/base/PCMain.cpp @@ -8,6 +8,7 @@ #include #else #include +#include #endif #include diff --git a/base/stringutil.h b/base/stringutil.h index 7cc61b3086..4c5824f9a0 100644 --- a/base/stringutil.h +++ b/base/stringutil.h @@ -1,7 +1,8 @@ #pragma once -#include -#include +#include +#include +#include #include #include "base/basictypes.h" diff --git a/ext/etcpack/CMakeLists.txt b/ext/etcpack/CMakeLists.txt index 806f4157b0..aa8e189074 100644 --- a/ext/etcpack/CMakeLists.txt +++ b/ext/etcpack/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) add_library(etcdec etcdec.cpp) #if UNIX -add_definitions(-PIC) +add_definitions(-fPIC) add_library(etcpack etcpack.cpp) diff --git a/ext/sha1/CMakeLists.txt b/ext/sha1/CMakeLists.txt index b1ac75827e..cb83b1eaec 100644 --- a/ext/sha1/CMakeLists.txt +++ b/ext/sha1/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) #if(UNIX) -add_definitions(-PIC) +add_definitions(-fPIC) add_definitions(-g) add_definitions(-O2) add_definitions(-Wall) diff --git a/ext/sha1/sha1.cpp b/ext/sha1/sha1.cpp index f9c5cdf84c..263c6b5927 100644 --- a/ext/sha1/sha1.cpp +++ b/ext/sha1/sha1.cpp @@ -9,7 +9,7 @@ // If compiling with MFC, you might want to add #include "StdAfx.h" #define _CRT_SECURE_NO_WARNINGS -#include "SHA1.h" +#include "sha1.h" #ifdef SHA1_UTILITY_FUNCTIONS #define SHA1_MAX_FILE_BUFFER (32 * 20 * 820) diff --git a/ext/stb_image/CMakeLists.txt b/ext/stb_image/CMakeLists.txt index 9c61b3ef99..d69d96b6b9 100644 --- a/ext/stb_image/CMakeLists.txt +++ b/ext/stb_image/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) #if(UNIX) -add_definitions(-PIC) +add_definitions(-fPIC) add_definitions(-g) add_definitions(-O2) add_definitions(-Wall) diff --git a/ext/stb_vorbis/CMakeLists.txt b/ext/stb_vorbis/CMakeLists.txt index 128e155afc..27561cc163 100644 --- a/ext/stb_vorbis/CMakeLists.txt +++ b/ext/stb_vorbis/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) #if(UNIX) -add_definitions(-PIC) +add_definitions(-fPIC) add_definitions(-g) add_definitions(-O2) add_definitions(-Wall) diff --git a/ext/vjson/CMakeLists.txt b/ext/vjson/CMakeLists.txt index 97ea0d4876..b8d19dc34f 100644 --- a/ext/vjson/CMakeLists.txt +++ b/ext/vjson/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) #if(UNIX) -add_definitions(-PIC) +add_definitions(-fPIC) add_definitions(-g) add_definitions(-O2) add_definitions(-Wall) diff --git a/file/CMakeLists.txt b/file/CMakeLists.txt index b1d9b09122..794d6660c4 100644 --- a/file/CMakeLists.txt +++ b/file/CMakeLists.txt @@ -8,6 +8,7 @@ set(SRCS set(SRCS ${SRCS}) add_library(file STATIC ${SRCS}) +target_link_libraries(file general zip) if(UNIX) add_definitions(-fPIC) diff --git a/gfx/texture_gen.cpp b/gfx/texture_gen.cpp index 6b6e76f6ed..3a8209933d 100644 --- a/gfx/texture_gen.cpp +++ b/gfx/texture_gen.cpp @@ -5,7 +5,8 @@ // future. #include -#include +#include +#include #include "base/basictypes.h" #include "gfx/texture.h" diff --git a/gfx_es2/CMakeLists.txt b/gfx_es2/CMakeLists.txt index fdf0dbfb71..43e11ef74d 100644 --- a/gfx_es2/CMakeLists.txt +++ b/gfx_es2/CMakeLists.txt @@ -7,6 +7,8 @@ set(SRCS set(SRCS ${SRCS}) add_library(gfx_es2 STATIC ${SRCS}) +target_link_libraries(gfx_es2 general gfx) +target_link_libraries(gfx_es2 general file) if(UNIX) add_definitions(-fPIC) diff --git a/ui/ui.cpp b/ui/ui.cpp index 02b6da0adb..0fa0554a49 100644 --- a/ui/ui.cpp +++ b/ui/ui.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "ui/ui.h" #include "gfx/texture_atlas.h"