From 5a9c2ce5ea1b272d73001acaf9ec15f1c0e5e041 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 28 Apr 2014 19:40:39 -0700 Subject: IT'S ALIVE! --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a588fe193..bd21af25e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 2.6) project(citra) -SET(GCC_COMPILE_FLAGS "-std=c++11 -fpermissive") +SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpermissive") +SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fpermissive") # silence some spam add_definitions(-Wno-attributes) @@ -11,11 +12,16 @@ add_definitions(${GCC_COMPILE_FLAGS}) # dependency checking set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) -include(FindOpenGL REQUIRED) include(FindX11 REQUIRED) find_package(PkgConfig REQUIRED) +find_package(GLEW REQUIRED) +find_package(OpenGL REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) +IF (APPLE) + FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) +ENDIF (APPLE) + include_directories(${GLFW_INCLUDE_DIRS}) option(DISABLE_QT4 "Disable Qt4 GUI" OFF) if(NOT DISABLE_QT4) @@ -40,6 +46,7 @@ git_branch_name(GIT_BRANCH) # external includes include_directories(${OPENGL_INCLUDE_DIR}) +include_directories(${GLEW_INCLUDE_DIR}) # internal includes include_directories(src) -- cgit v1.2.3 From 52377cf0d2e29143717898e82f09349d417da1a0 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 29 Apr 2014 19:27:01 -0700 Subject: Some more experimentation --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bd21af25e..49c1a384a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(citra) +SET(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive") SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpermissive") SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fpermissive") @@ -19,7 +20,10 @@ find_package(OpenGL REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) IF (APPLE) - FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) + FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) + SET(CMAKE_CXX_FLAGS "-stdlib=libc++") + SET(CMAKE_CXX_FLAGS_DEBUG "-stdlib=libc++") + SET(CMAKE_CXX_FLAGS_RELEASE "-stdlib=libc++") ENDIF (APPLE) include_directories(${GLFW_INCLUDE_DIRS}) -- cgit v1.2.3 From a7f3ed003d03c79f83c1c354329e5ce47f6940e7 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 30 Apr 2014 16:56:25 -0700 Subject: A bit of Cmake love --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c1a384a..6837d36fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,14 @@ IF (APPLE) SET(CMAKE_CXX_FLAGS_RELEASE "-stdlib=libc++") ENDIF (APPLE) +#external includes include_directories(${GLFW_INCLUDE_DIRS}) +include_directories(${OPENGL_INCLUDE_DIR}) +include_directories(${GLEW_INCLUDE_DIR}) + +#use pkg_search_module library dirs +link_directories(${GLFW_LIBRARY_DIRS}) + option(DISABLE_QT4 "Disable Qt4 GUI" OFF) if(NOT DISABLE_QT4) include(FindQt4) @@ -47,10 +54,6 @@ include(GetGitRevisionDescription) get_git_head_revision(GIT_REF_SPEC GIT_REV) git_describe(GIT_DESC --always --long --dirty) git_branch_name(GIT_BRANCH) - -# external includes -include_directories(${OPENGL_INCLUDE_DIR}) -include_directories(${GLEW_INCLUDE_DIR}) # internal includes include_directories(src) -- cgit v1.2.3 From 7817d6c79a2c169eb90714c1a05745d208e8ad32 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 30 Apr 2014 23:47:38 -0700 Subject: Support for C++11 on OSX --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 6837d36fd..07a04c2c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,9 +21,8 @@ pkg_search_module(GLFW REQUIRED glfw3) IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) - SET(CMAKE_CXX_FLAGS "-stdlib=libc++") - SET(CMAKE_CXX_FLAGS_DEBUG "-stdlib=libc++") - SET(CMAKE_CXX_FLAGS_RELEASE "-stdlib=libc++") + SET(CMAKE_CXX_FLAGS "-stdlib=libc++") + SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++") ENDIF (APPLE) #external includes -- cgit v1.2.3 From 1e729e7cae237a14067138aaf2b4f5933dba3b36 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 16 May 2014 23:03:10 -0700 Subject: Added FindGLEW to cmake-modules --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 07a04c2c3..7aa6637df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ add_definitions(-DSINGLETHREADED) add_definitions(${GCC_COMPILE_FLAGS}) # dependency checking +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) include(FindX11 REQUIRED) find_package(PkgConfig REQUIRED) @@ -48,7 +49,6 @@ if(NOT DISABLE_QT4) endif() # generate git revision information -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules/") include(GetGitRevisionDescription) get_git_head_revision(GIT_REF_SPEC GIT_REV) git_describe(GIT_DESC --always --long --dirty) -- cgit v1.2.3 From 603ef89dad8f261464067c0e68c320d5bd595d25 Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 17 May 2014 12:54:38 -0700 Subject: Indent fixes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa6637df..f7ea1949b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ pkg_search_module(GLFW REQUIRED glfw3) IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) - SET(CMAKE_CXX_FLAGS "-stdlib=libc++") + SET(CMAKE_CXX_FLAGS "-stdlib=libc++") SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++") ENDIF (APPLE) -- cgit v1.2.3 From 71b8789803e801dae6eae081c741523c62e071cd Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 19 May 2014 13:51:59 -0700 Subject: Indent fixes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f7ea1949b..b4665640c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ pkg_search_module(GLFW REQUIRED glfw3) IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) SET(CMAKE_CXX_FLAGS "-stdlib=libc++") - SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++") + SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++") ENDIF (APPLE) #external includes -- cgit v1.2.3 From 403e4bf837c47c7e10dc006fafffea8c160c890f Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 19 May 2014 15:19:36 -0700 Subject: CMakeLists: rename HEADS, improved comments Changes for clarity of comments, removed redundant compiler flags. --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b4665640c..76190c5e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 2.6) project(citra) SET(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive") -SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpermissive") -SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fpermissive") # silence some spam add_definitions(-Wno-attributes) @@ -20,6 +18,7 @@ find_package(GLEW REQUIRED) find_package(OpenGL REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) +# corefoundation is required only on OSX IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) SET(CMAKE_CXX_FLAGS "-stdlib=libc++") @@ -31,7 +30,7 @@ include_directories(${GLFW_INCLUDE_DIRS}) include_directories(${OPENGL_INCLUDE_DIR}) include_directories(${GLEW_INCLUDE_DIR}) -#use pkg_search_module library dirs +# workaround for GLFW linking on OSX link_directories(${GLFW_LIBRARY_DIRS}) option(DISABLE_QT4 "Disable Qt4 GUI" OFF) -- cgit v1.2.3 From 9216c96f48b498788b78739655b64caf95307fe3 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 19 May 2014 16:33:23 -0700 Subject: CMakeLists: Fixed GLEW include var name, compile flag vars After adding FindGLEW.cmake to externals, the variable call for the GLEW include path needed to be revised. Append flags on OSX, rather than overwrite them. I realized that GCC_COMPILE_FLAGS was changed to CMAKE_CXX_FLAGS mistakenly, so both were changed to a more platform-independent name. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 76190c5e4..114e39207 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 2.6) project(citra) -SET(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive") +SET(CXX_COMPILE_FLAGS "-std=c++11 -fpermissive") # silence some spam add_definitions(-Wno-attributes) add_definitions(-DSINGLETHREADED) -add_definitions(${GCC_COMPILE_FLAGS}) +add_definitions(${CXX_COMPILE_FLAGS}) # dependency checking list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules/") @@ -21,14 +21,14 @@ pkg_search_module(GLFW REQUIRED glfw3) # corefoundation is required only on OSX IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) - SET(CMAKE_CXX_FLAGS "-stdlib=libc++") - SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") ENDIF (APPLE) #external includes include_directories(${GLFW_INCLUDE_DIRS}) include_directories(${OPENGL_INCLUDE_DIR}) -include_directories(${GLEW_INCLUDE_DIR}) +include_directories(${GLEW_INCLUDE_PATH}) # workaround for GLFW linking on OSX link_directories(${GLFW_LIBRARY_DIRS}) -- cgit v1.2.3