Patch dependancy version check for CMake

Patch dependancy version check for CMake

Postby Elvano » 05 Mar 2014, 13:07

Hey,

Here is a CMake patch to warn people about old using an unsupported version of Ogre, suggested (and made) by nido on IRC.
I hope someone finds the time to implement that line o' code.
{l Code}: {l Select All Code}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b45466b..f249029 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,6 +235,11 @@ find_package(OGRE REQUIRED)
 find_package(CEGUI REQUIRED)
 find_package(SFML REQUIRED COMPONENTS Audio System)
 
+if ((OGRE_VERSION_MAJOR LESS 1) OR (OGRE_VERSION_MINOR LESS 9))
+    message(SEND_ERROR "OGRE version 1.9.0 required")
+endif()
+
+
 #This has to cover the versions not already known by CMake
 set(Boost_ADDITIONAL_VERSIONS 1.47 1.47.0 1.47.1)
Elvano~
User avatar
Elvano
 
Posts: 121
Joined: 23 Sep 2013, 12:42

Re: Patch dependancy version check for CMake

Postby Bertram » 06 Mar 2014, 02:23

Thanks :)

Did you test it? And can you push it if you did?
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 07 Mar 2014, 00:50

Here is a version that also checks the minimum version of SFML. If you tell me other library version numbers on which you depend i will happily update this patch to include it or create a new one.


{l Code}: {l Select All Code}
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index b45466b..61734a6 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -235,6 +235,14 @@ find_package(OGRE REQUIRED)
     find_package(CEGUI REQUIRED)
     find_package(SFML REQUIRED COMPONENTS Audio System)
     
    +if ((OGRE_VERSION_MAJOR LESS 1) OR (OGRE_VERSION_MINOR LESS 9))
    +    message(SEND_ERROR "OGRE version 1.9.0 required")
    +endif()
    +
    +if (SFML_VERSION_MAJOR LESS 2)
    +    message(SEND_ERROR "SFML version 2.0 required")
    +endif()
    +
     #This has to cover the versions not already known by CMake
     set(Boost_ADDITIONAL_VERSIONS 1.47 1.47.0 1.47.1)
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Patch dependancy version check for CMake

Postby Bertram » 07 Mar 2014, 16:42

Thanks nido! :)
And welcome! We also need CEGUI > 0.8 in case you can do something.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 11 Mar 2014, 22:03

CEGUI version check + fix logic error in OGRE version check earlier in this thread
{l Code}: {l Select All Code}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72251c1..a0f0a2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,10 +179,14 @@ find_package(OGRE REQUIRED)
 find_package(CEGUI REQUIRED)
 find_package(SFML REQUIRED COMPONENTS Audio System)
 
-if ((OGRE_VERSION_MAJOR LESS 1) OR (OGRE_VERSION_MINOR LESS 9))
+if ((OGRE_VERSION_MAJOR LESS 1) AND (OGRE_VERSION_MINOR LESS 9))
     message(SEND_ERROR "OGRE version 1.9.0 required")
 endif()
 
+if ((CEGUI_VERSION_MINOR LESS 8) OR (CEGUI_VERSION_MAJOR LESS 1))
+    message(SEND_ERROR "CEGUI version 0.8.0 required")
+endif()
+
 if (SFML_VERSION_MAJOR LESS 2)
     message(SEND_ERROR "SFML version 2.0 required")
 endif()


secondly, I was told angelscript was once included by someone who wanted to do something but nothing really happened. I ripped out Angelscript and all references. In this quest I believe there was exactly one call which was not allocating/deallocating memory for it; and as far as i could see; ripping it out had no effect on the game. Patch is too large to display in-line (~700k since all of angelscript is included textually), but have a link instead: http://wardenscat.foxserver.be/nido/noangels.diff

last but not least, adding the check for boost for non win32/mingw platforms:
{l Code}: {l Select All Code}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54e6d81..f5fd338 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,6 +182,11 @@ find_package(SFML REQUIRED COMPONENTS Audio System)
 #This has to cover the versions not already known by CMake
 set(Boost_ADDITIONAL_VERSIONS 1.47 1.47.0 1.47.1)
 
+if(MINGW)
+    # We need to specify the compiler here that Ogre used to compile boost
+    set(Boost_COMPILER -mgw45)
+endif()
+
 if(WIN32 AND ${OGRE_FOUND})
        # On windows we can try to use boost from the Ogre SDK instead
     set( CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${ENV_OGRE_HOME}/boost_1_44/lib)
@@ -191,11 +196,7 @@ if(WIN32 AND ${OGRE_FOUND})
     # This is because the libs in the ogre dir has a lib prefix making findboost not find them
        set( OD_BOOST_LIB_DIRS  ${ENV_OGRE_HOME}/boost_1_44/lib)
        set( OD_BOOST_INCLUDE_DIRS ${ENV_OGRE_HOME}/boost_1_44)
-endif()
-
-if(MINGW)
-    # We need to specify the compiler here that Ogre used to compile boost
-    set(Boost_COMPILER -mgw45)
+else(WIN32 AND ${OGRE_FOUND})
     find_package(Boost COMPONENTS thread REQUIRED)
 endif()


Whilst one should never automatically trust code dumped by a stranger, i would warn that for the last patch, it is NOT TESTED on windows, due to lack of running that operating system. Before anyone would blindly include it into the repository, make sure it does still work on windows as well.
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Patch dependancy version check for CMake

Postby Bertram » 11 Mar 2014, 23:56

Hi nido, :)

It's great to have some help on that. People usually don't have interest in setting up a clean build system while I do think it's a very important step.

As for the Cmake changes linked to check the dependencies, I would change the text about the requirement to clearly tell about the minimum version,
for instance, by saying: "Ogre version 1.9.0 'or more' is required" or "Ogre version >= 1.9.0 version required."
(Btw, I can test the changes on Windows for you when we'll come to an agreement :])

Secondly, as it is Paul, who is compiling using an unchanged cmake file (as I have my own, seemingly incompatible, changes needed to make this work under debian),
I think that only he can have the final review word on whether this change is working. Let's wait for his advice there, I guess.

Also, while I see no problem in removing AS if everyone is ok with it, I have a concern about the console command ported to using it, that you can see there, for instance:
https://github.com/Bertram25/OpenDungeo ... console.as
It seems most of the code ported to AS was simply commented in this file:
https://github.com/Bertram25/OpenDungeo ... ommand.cpp

Here again, if we drop AS, and I'd like to have Paul's word on it also, could you re-enable the c++ functions?

Last but not least, could you make git patches files instead of raw diffs? This would help us to test them very easily.
To create one, you can commit the files in your local repository (no push), and do the following command:
git format-patch -1

The -1 can be changed to -2 or 3, ... and will create patches files in the following naming convention:
0001-<Commit short description>.patch

Those file can easily be imported using 'git am' by other developers.

You could also create a github account or see with the OD moderators to get some access. I'll let you see about that.
I'm just begging that no incomplete, broken, or big feature changes are pushed without discussing them first.

My two cents, thanks a lot for the work! And best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 12 Mar 2014, 21:28

Bertram {l Wrote}:It's great to have some help on that. People usually don't have interest in setting up a clean build system while I do think it's a very important step.

I would agree with what you say for 100%.

Bertram {l Wrote}:As for the Cmake changes linked to check the dependencies, I would change the text about the requirement to clearly tell about the minimum version, for instance, by saying: "Ogre version 1.9.0 'or more' is required" or "Ogre version >= 1.9.0 version required."

good point. I'll see if i can make a new local branch with changes like that (already have the earlier patch committed

Bertram {l Wrote}:(Btw, I can test the changes on Windows for you when we'll come to an agreement :])

Could you test the boost patch in my last post? Whilst I was careful changing it, this actually changes the way configuration works and thus might give unintended sideeffects on the win32 and mingw platforms (are these actually considered different platforms? or is mingw also considered win32?)

Bertram {l Wrote}:Secondly, as it is Paul, who is compiling using an unchanged cmake file (as I have my own, seemingly incompatible, changes needed to make this work under debian), I think that only he can have the final review word on whether this change is working. Let's wait for his advice there, I guess.


In my humble opinion, working with changed CMakeList.txt can be a problem. If you aren't touching the build system at all these problems may be mitigated. Possibly though some of your changes should be given as command line arguments rather then changes in said file (for example, on my fedora system I need to teach cmake where to find the homemade cegui installation, since i got it installed in a nonstandard path). Regardles of that, it could be argued that such changes may be included in order to have CMake work "by default" on "most developers' platforms". In that regard, I would be happy to help diagnose the trouble you are having.

Bertram {l Wrote}:Also, while I see no problem in removing AS if everyone is ok with it,


I know nothing of any consent regarding this subject. Perhaps we need to create a separate thread for this point. There are a few things in regards to this I would like to mention. I went ahead checking how hard it would be to delete since someone allured this may just be excess code which only served to give build errors to new users, and since angelscript is a package in its own right, which in my opinion means we should depend on a system supplied version.

Second is the question of what it is doing/supposed to do. In general, I think using a scripting language in a game can be a good idea. To the question what should be done in said scripting language, the answer is usually "as much as possible". What such a language should comprise in the context of opendungeons may also already be defined, so I will not comment on this further with my own ideas until I have found that document (or word that it does not exist).

Bertram {l Wrote}:I have a concern about the console command ported to using it...

Here it appears that it is actually used, though we apparently have a working c++ alternative. Still, looking at the angelscript website and code; it seems to be more or less a relatively unknown (please correct me) copy of c/c++ "without pointers", and I wonder if this scripting language would be a good fit. This calls back to the 'what are the scripts supposed to do' question above.

Bertram {l Wrote}:Last but not least, could you make git patches files instead of raw diffs? This would help us to test them very easily.
To create one, you can commit the files in your local repository (no push), and do the following command:
git format-patch -1...

thanks for the example as well. I'll see if i can make a "git patch" of the version requirements as you described.



{l Code}: {l Select All Code}
From f8eda5d850e9e1fe4dcba98833c9eed4ce5d52f3 Mon Sep 17 00:00:00 2001
From: Nido Media <nido@foxserver.be>
Date: Wed, 12 Mar 2014 21:18:11 +0100
Subject: [PATCH] add version checks for ogre/sfml/cegui, fix Boost check

---
 CMakeLists.txt | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62498a4..9aa833c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,9 +229,26 @@ find_package(OGRE REQUIRED)
 find_package(CEGUI REQUIRED)
 find_package(SFML REQUIRED COMPONENTS Audio System)
 
+if ((OGRE_VERSION_MAJOR LESS 1) AND (OGRE_VERSION_MINOR LESS 9))
+    message(SEND_ERROR "OGRE version 1.9.0 required")
+endif()
+
+if ((CEGUI_VERSION_MINOR LESS 8) OR (CEGUI_VERSION_MAJOR LESS 1))
+    message(SEND_ERROR "CEGUI version 0.8.0 required")
+endif()
+
+if (SFML_VERSION_MAJOR LESS 2)
+    message(SEND_ERROR "SFML version 2.0 required")
+endif()
+
 #This has to cover the versions not already known by CMake
 set(Boost_ADDITIONAL_VERSIONS 1.47 1.47.0 1.47.1)
 
+if(MINGW)
+    # We need to specify the compiler here that Ogre used to compile boost
+    set(Boost_COMPILER -mgw45)
+endif()
+
 if(WIN32 AND ${OGRE_FOUND})
    # On windows we can try to use boost from the Ogre SDK instead
     set( CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${ENV_OGRE_HOME}/boost_1_44/lib)
@@ -241,11 +258,7 @@ if(WIN32 AND ${OGRE_FOUND})
     # This is because the libs in the ogre dir has a lib prefix making findboost not find them
    set( OD_BOOST_LIB_DIRS  ${ENV_OGRE_HOME}/boost_1_44/lib)
    set( OD_BOOST_INCLUDE_DIRS ${ENV_OGRE_HOME}/boost_1_44)
-endif()
-
-if(MINGW)
-    # We need to specify the compiler here that Ogre used to compile boost
-    set(Boost_COMPILER -mgw45)
+else(WIN32 AND ${OGRE_FOUND})
     find_package(Boost COMPONENTS thread REQUIRED)
 endif()
 
--
1.8.5.3



This patch also contains the boost check.


Bertram {l Wrote}:You could also create a github account or see with the OD moderators to get some access. I'll let you see about that.
I'm just begging that no incomplete, broken, or big feature changes are pushed without discussing them first.

I was wondering about the procedures regarding committing code. Does a ratified process that should be followed before code is committed to the development branch exist? Whilst most code _should_ be compatible between systems without issue there are sometimes cases when system specific subsystems need to be used. Assuming 'development' is the main working branch, do we have a place for "works on x, please test on y" kinda commits (e.g. my boost recognition changes)?

Thank you for the feedback. I hope this post has use for you as well.


Kind regards,

Nido Media
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Patch dependancy version check for CMake

Postby Bertram » 13 Mar 2014, 09:50

Hi nido, :)

Could you test the boost patch in my last post? Whilst I was careful changing it, this actually changes the way configuration works and thus might give unintended sideeffects on the win32 and mingw platforms (are these actually considered different platforms? or is mingw also considered win32?)

Ok, I will. Yet, I do think your patch will have no effect on windows since I'm using MSVC to compile. (Thus, no, MingW and win32 aren't the same thing. As I'm sure you already know, MingW is a compiler, Win32 an OS). But anyway, I'll make the test. :)

In my humble opinion, working with changed CMakeList.txt can be a problem. If you aren't touching the build system at all these problems may be mitigated. Possibly though some of your changes should be given as command line arguments rather then changes in said file (for example, on my fedora system I need to teach cmake where to find the homemade cegui installation, since i got it installed in a nonstandard path). Regardles of that, it could be argued that such changes may be included in order to have CMake work "by default" on "most developers' platforms". In that regard, I would be happy to help diagnose the trouble you are having.

Unfortunately, the changes I made in my version of the CMakeLists.txt file weren't made out of laziness or fanciness. In short, here is what I mainly changed:
https://github.com/Bertram25/OpenDungeo ... 00fa95f011
- I put the project() statement early so that certain cmake variables would be set before their actual use.
- I changed this to that:
{l Code}: {l Select All Code}
-    if(${OGRE_PLUGIN_DIR_REL} STREQUAL NOTFOUND)
+    if("${OGRE_PLUGIN_DIR_REL}" STREQUAL NOTFOUND)

since it was triggering a cmake error on Debian for me. (Btw, I do compile the game on both OS).
Why did I kept those to myself? Well, because it broke the CMake invocation for Paul, and because we both have much more to tackle on with this project, atm. So we decided to look at that later.
(The code needs a hell lot of cleanup and fixes.)

But now you're on it, I guess the time has come to look at the problem and find a common working solution. Please note that I did that as well:
https://github.com/Bertram25/OpenDungeo ... 8c9e163934
^ This commit should be changed to make cmake copy any .level files instead of testing for Test.level file only, the Test.level in the level_git/ folder should be copied in the SVN levels/ and the level_git/ folder tossed.

https://github.com/Bertram25/OpenDungeo ... 705df0abd6
^ I guess we had a similar idea here.

About the AS question:
I guess nobody is really in charge of code lead anymore, and I understand why Paul felt alone in coding here, but I'd say this, out of pure logical thinking:
Cons:
- The Angel Scripting version bundled in the repo, as you said, is starting to be old.
- It could be put as an outer dependency.
- It might be cluttering only and we might want something we're more at ease with.

Pros:
- AS is fitting for game scripting, as it is used, for instance in Overgrowth, for one.
- The bindings are there, and ready to be completed.
- Some example of porting is actually done. The console command porting is IMHO not the best area to use AS, but we can use that to get inspiration for other use.
- The AS version bundled was made sure of being compilable both on Windows and Linux, at least to me. Several projects do import deps code when using sensible dependencies, so I understand the move here.

Considering this is a spare-time project, we should avoid technology-switch if we aren't completely sure of it. So, either:
- Several coders involved should be at ease with working on the replacement (this means you, Paul and me, atm ;])
- Or we keep it as is for now and concentrate on fixing all the other area, and take the opportunity to ask everyone involved about this in between.

As for me, and as you suggested, I'd open a new thread and use it to vote on what to do.

What do you think about it?

I'll see if i can make a new local branch with changes like that (already have the earlier patch committed

Note that in git, you can squash (merge) several commits into one using interactive rebasing in your local repository. (See git rebase -i)
If you can get at ease with that, you'll be able to do almost anything using git. :)
(Note also that once you've modified your local clone, you'll have git push -f to force the push to the remote repository if some were already pushed.)

I was wondering about the procedures regarding committing code. Does a ratified process that should be followed before code is committed to the development branch exist? Whilst most code _should_ be compatible between systems without issue there are sometimes cases when system specific subsystems need to be used. Assuming 'development' is the main working branch, do we have a place for "works on x, please test on y" kinda commits (e.g. my boost recognition changes)?

Atm, Paul and me have created <nickname>-integration branches on the sf remote repository where we put experimental stuff we then can cherry-pick from one another to test.
I've also made a github clone, that I use as my own pre-integration branch because github offers much more convenient views and tools to do reviews, etc.

So, I'd say, ask for sf access to Paul, and then push new stuff to a 'nido-integration' branch, so we can make reviews of one another's code before putting that to the development branch.
In a near future, I'd like to sync the master branch and drop the development one because there are already too many branches there ;), and because it's more generally the usual way of doing things with git. Little by little, we'll try to get rid of obsolete branches to get stuff cleaner.
I'm also pushing a bit to get the media files (not the media-source that can stay in SVN) into git as certain commits involve synced game files and code, and it would be more convenient, would both file types be in the same repo, allowing new coders and users to clone only one repo before playing. (That's why I made the github clone at first.)

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby Bertram » 17 Mar 2014, 21:56

Hi nido, :)

That part doesn't work:
{l Code}: {l Select All Code}
-endif()
-
-if(MINGW)
-    # We need to specify the compiler here that Ogre used to compile boost
-    set(Boost_COMPILER -mgw45)
+else(WIN32 AND ${OGRE_FOUND})
     find_package(Boost COMPONENTS thread REQUIRED)
 endif()

Because this line doesn't work on windows:
{l Code}: {l Select All Code}
find_package(Boost COMPONENTS thread REQUIRED)


I've merged your other changes with mine and removed the one change not working for Paul.

@Paul, could you try this CMakeLists.txt file and tell me whether it's working for you? Thanks! :)
{l Code}: {l Select All Code}
cmake_minimum_required(VERSION 2.8)

##################################
#### Useful variables ############
##################################

#project paths
set(SRC "${CMAKE_SOURCE_DIR}/source")
set(DEPENDENCIES_DIR "${CMAKE_SOURCE_DIR}/dependencies")
set(ANGELSCRIPT_DIR "${DEPENDENCIES_DIR}/angelscript")
set(ANGELSCRIPT_SRC_DIR "${ANGELSCRIPT_DIR}/angelscript/source")
set(ANGELSCRIPT_ADDON_DIR "${ANGELSCRIPT_DIR}/add_on")
set(TINYGETTEXT_DIR "${DEPENDENCIES_DIR}/tinygettext")
set(TINYXML_DIR "${DEPENDENCIES_DIR}/tinyxml2")

#cmake paths
set(CMAKE_CONFIG_DIR "${CMAKE_SOURCE_DIR}/cmake/config")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)

if(NOT CMAKE_BUILD_TYPE)
    message(STATUS "CMake build type is not set, defaulting to 'Release'")
    set(CMAKE_BUILD_TYPE "Release")
endif()

##################################
#### ExplicitCompilerFlags #######
##################################
if (MSVC)
  set ( CMAKE_CXX_FLAGS "/GLOBAL_FLAGS_GO_HERE")
  set ( CMAKE_CXX_FLAGS_DEBUG "/DEBUG_FLAGSS_GO_HERE")
  set ( CMAKE_CXX_FLAGS_RELEASE  "/RELEASE_FLAGS_GO_HERE" )
endif ()

if (BORLAND)
  set ( CMAKE_CXX_FLAGS "/GLOBAL_FLAGS_GO_HERE")
  set ( CMAKE_CXX_FLAGS_DEBUG "/DEBUG_FLAGS_GO_HERE")
  set ( CMAKE_CXX_FLAGS_RELEASE  "/RELEASE_FLAGS_GO_HERE" )
endif ()

if (CMAKE_COMPILER_IS_GNUCXX)
  set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wunused -Wno-deprecated -fno-strict-aliasing" CACHE STRING "compile flags" FORCE)
  list( APPEND CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS}   -g -O2")
  set ( CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS}   -O3 " )
endif ()


##################################
#### Source files (.cpp) #########
##################################

#Add new .cpp files here so that they get compiled

set(OD_SOURCEFILES
    #AngelScript sources
    ${ANGELSCRIPT_SRC_DIR}/as_atomic.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_builder.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_bytecode.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_arm.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_mips.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_ppc.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_ppc_64.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_sh4.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_x64_gcc.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_x64_msvc.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_x64_mingw.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_x86.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_callfunc_xenon.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_compiler.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_configgroup.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_context.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_datatype.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_gc.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_generic.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_globalproperty.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_memory.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_module.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_objecttype.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_outputbuffer.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_parser.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_restore.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_scriptcode.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_scriptengine.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_scriptfunction.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_scriptnode.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_scriptobject.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_string.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_string_util.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_thread.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_tokenizer.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_typeinfo.cpp
    ${ANGELSCRIPT_SRC_DIR}/as_variablescope.cpp

    #AngelScript Addon sources
    ${ANGELSCRIPT_ADDON_DIR}/scriptarray/scriptarray.cpp
    ${ANGELSCRIPT_ADDON_DIR}/scriptbuilder/scriptbuilder.cpp
    ${ANGELSCRIPT_ADDON_DIR}/scripthelper/scripthelper.cpp
    ${ANGELSCRIPT_ADDON_DIR}/scriptstdstring/scriptstdstring.cpp

    #Tinygettext sources
    ${TINYGETTEXT_DIR}/dictionary_manager.cpp
    ${TINYGETTEXT_DIR}/dictionary.cpp
    ${TINYGETTEXT_DIR}/language.cpp
    ${TINYGETTEXT_DIR}/plural_forms.cpp
    ${TINYGETTEXT_DIR}/po_parser.cpp
    ${TINYGETTEXT_DIR}/tinygettext.cpp

    #Tinyxml2 sources
    ${TINYXML_DIR}/tinyxml2.cpp

    #OpenDungeons sources
    ${SRC}/AbstractApplicationMode.cpp
    ${SRC}/AIFactory.cpp
    ${SRC}/AIManager.cpp
    ${SRC}/AIWrapper.cpp
    ${SRC}/ASWrapper.cpp
    ${SRC}/BaseAI.cpp
    #{SRC}/Bspline.cpp
    ${SRC}/CameraManager.cpp
    ${SRC}/ChatMessage.cpp
    ${SRC}/Client.cpp
    ${SRC}/ClientNotification.cpp
    ${SRC}/Console.cpp
    ${SRC}/Console_executePromptCommand.cpp
    ${SRC}/Console_getHelp.cpp
    ${SRC}/ConsoleMode.cpp
    ${SRC}/Creature.cpp
    ${SRC}/CreatureAction.cpp
    ${SRC}/CreatureDefinition.cpp
    ${SRC}/CreatureSound.cpp
    ${SRC}/CullingManager.cpp
    ${SRC}/DirectionalTrap.cpp
    ${SRC}/EditorMode.cpp
    ${SRC}/Field.cpp
    ${SRC}/FppMode.cpp
    ${SRC}/Functions.cpp
    ${SRC}/GameEntity.cpp
    ${SRC}/GameMap.cpp
    ${SRC}/GameMode.cpp
    ${SRC}/GoalClaimNTiles.cpp
    ${SRC}/Goal.cpp
    ${SRC}/GoalKillAllEnemies.cpp
    ${SRC}/GoalMineNGold.cpp
    ${SRC}/GoalProtectCreature.cpp
    ${SRC}/GoalProtectDungeonTemple.cpp
    ${SRC}/Gui.cpp
    ${SRC}/HermiteCatmullSpline.cpp
    ${SRC}/InputManager.cpp
    ${SRC}/LogManager.cpp
    ${SRC}/main.cpp
    ${SRC}/MapLight.cpp
    ${SRC}/MapLoader.cpp
    ${SRC}/MenuMode.cpp
    ${SRC}/MiniMap.cpp
    ${SRC}/MissileObject.cpp
    ${SRC}/ModeManager.cpp
    ${SRC}/MortuaryQuad.cpp
    ${SRC}/MovableGameEntity.cpp
    ${SRC}/MusicPlayer.cpp
    ${SRC}/NullAI.cpp
    ${SRC}/ODApplication.cpp
    ${SRC}/ODFrameListener.cpp
    ${SRC}/Player.cpp
    ${SRC}/ProximityTrap.cpp
    ${SRC}/PrefixTreeLL.cpp
    ${SRC}/Quadtree.cpp
    ${SRC}/RadialVector2.cpp
    ${SRC}/Random.cpp
    ${SRC}/RenderManager.cpp
    ${SRC}/RenderRequest.cpp
    ${SRC}/ResourceManager.cpp
    ${SRC}/Room.cpp
    ${SRC}/RoomDojo.cpp
    ${SRC}/RoomDungeonTemple.cpp
    ${SRC}/RoomForge.cpp
    ${SRC}/RoomObject.cpp
    ${SRC}/RoomPortal.cpp
    ${SRC}/RoomQuarters.cpp
    ${SRC}/RoomTreasury.cpp
    ${SRC}/Seat.cpp
    ${SRC}/Server.cpp
    ${SRC}/ServerNotification.cpp
    ${SRC}/Socket.cpp
    ${SRC}/SoundEffectsHelper.cpp
    ${SRC}/Spell.cpp
    ${SRC}/TestAI.cpp
    ${SRC}/TextRenderer.cpp
    ${SRC}/Tile.cpp
    ${SRC}/TileCoordinateMap.cpp
    ${SRC}/TileContainer.cpp
    ${SRC}/TileContainersModificator.cpp
    ${SRC}/Translation.cpp
    ${SRC}/Trap.cpp
    ${SRC}/TrapBoulder.cpp
    ${SRC}/TrapCannon.cpp
    ${SRC}/Weapon.cpp
)

##################################
#### Project settings ############
##################################

project(OpenDungeons)

#postfix bin if we are on linux as we want to launch with a script
if(WIN32)
    set(PROJECT_BINARY_NAME "OpenDungeons")
else()
    set(PROJECT_BINARY_NAME "OpenDungeons.bin")
endif()

# Project version
# TODO - make this set version string in source file automatically.
set(${PROJECT_NAME}_MAJOR_VERSION 0)
set(${PROJECT_NAME}_MINOR_VERSION 4)
set(${PROJECT_NAME}_PATCH_LEVEL   9)

# Where we want the binary
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})

##################################
#### Find packages ###############
##################################

find_package(OIS REQUIRED)
find_package(OGRE REQUIRED)
find_package(CEGUI REQUIRED)
find_package(SFML REQUIRED COMPONENTS Audio System)

if ((OGRE_VERSION_MAJOR LESS 1) AND (OGRE_VERSION_MINOR LESS 9))
    message(SEND_ERROR "OGRE version >= 1.9.0 required")
endif()

if ((CEGUI_VERSION_MINOR LESS 8) OR (CEGUI_VERSION_MAJOR LESS 1))
    message(SEND_ERROR "CEGUI version >= 0.8.0 required")
endif()

if (SFML_VERSION_MAJOR LESS 2)
    message(SEND_ERROR "SFML version >= 2.0 required")
endif()

#This has to cover the versions not already known by CMake
set(Boost_ADDITIONAL_VERSIONS 1.47 1.47.0 1.47.1 1.55.0)

if(WIN32 AND ${OGRE_FOUND})
    # On windows we can try to use boost from the Ogre SDK instead
    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${ENV_OGRE_HOME}/boost_1_44/lib)
    set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${ENV_OGRE_HOME}/boost_1_44)

    # We set these instead of searching if using MSVC
    # This is because the libs in the ogre dir has a lib prefix making findboost not find them
    set(OD_BOOST_LIB_DIRS  ${ENV_OGRE_HOME}/boost_1_44/lib)
    set(OD_BOOST_INCLUDE_DIRS ${ENV_OGRE_HOME}/boost_1_44)

    find_package(Boost)
    if(Boost_FOUND)
        set(OD_BOOST_LIB_DIRS  ${Boost_INCLUDE_DIRS}/stage/lib)
        set(OD_BOOST_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
    endif()
endif()

if(MINGW)
    # We need to specify the compiler here that Ogre used to compile boost
    set(Boost_COMPILER -mgw45)
    find_package(Boost COMPONENTS thread system REQUIRED)
endif()

#OpenAL
#If we are on windows we can also look for OpenAL where SFML is
if(WIN32 AND ${SFML_FOUND})
    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SFMLDIR}/extlibs/libs-vc2005 ${SFMLDIR}/extlibs/libs-mingw)
    set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SFMLDIR}/extlibs/headers ${SFMLDIR}/extlibs/headers/AL)
endif()

find_package(OpenAL REQUIRED)

if(UNIX)
    find_package(Threads REQUIRED)
    find_package(Boost COMPONENTS thread system REQUIRED)
endif()

##################################
#### Headers and linking #########
##################################

#add all project specific include directorieS
include_directories(
    #OpenDungeons includes
    ${CMAKE_SOURCE_DIR}/source

    #General external includes
    ${DEPENDENCIES_DIR}

    #tinygettext includes
    ${TINYGETTEXT_DIR}

    #tinyxml2 includes
    ${TINYXML_DIR}

    #Angelscript includes
    ${ANGELSCRIPT_DIR}/angelscript/include
    ${ANGELSCRIPT_SRC_DIR}

    #AngelScript Addons, in-comment only the ones we actually use
    ${ANGELSCRIPT_ADDON_DIR}/scriptarray
    ${ANGELSCRIPT_ADDON_DIR}/scriptbuilder
    ${ANGELSCRIPT_ADDON_DIR}/scripthelper
    ${ANGELSCRIPT_ADDON_DIR}/scriptstdstring

    #external packages includes
    ${CEGUI_INCLUDE_DIR}
    ${SFML_INCLUDE_DIR}
    ${OGRE_INCLUDE_DIRS}
    ${OPENAL_INCLUDE_DIR}
    ${OIS_INCLUDE_DIRS}
)

if(WIN32)
    if(MINGW)
        # Boost
        link_libraries(${Boost_LIBRARIES})
        include_directories(${Boost_INCLUDE_DIRS})
    endif()

    if(MSVC)
        #Provide dirent.h if visual studio is used
        include_directories(${DEPENDENCIES_DIR}/dirent)
        include_directories(${OD_BOOST_INCLUDE_DIRS})
        link_directories(${OD_BOOST_LIB_DIRS})
    endif()

    #Pthreads on windows
    include_directories(${DEPENDENCIES_DIR}/pthreads/include/)
    link_directories(${DEPENDENCIES_DIR}/pthreads/lib/)
endif()

##################################
#### Binary ######################
##################################

# Create the binary file (WIN32 makes sure there is no console window on windows.)
add_executable(${PROJECT_BINARY_NAME} WIN32 ${OD_SOURCEFILES})

# set path
set(BINDIR games CACHE PATH "")

##################################
#### Install targets #############
##################################

# Add install target
if(WIN32)
    install(TARGETS ${PROJECT_BINARY_NAME}
        DESTINATION .
    )
else ()
    install(TARGETS ${PROJECT_BINARY_NAME}
        DESTINATION ${BINDIR}
    )
endif()

##################################
#### Link libraries ##############
##################################

# Link libraries
target_link_libraries(
    #target
    ${PROJECT_BINARY_NAME}

    #libraries
    ${OGRE_LIBRARIES}
    ${OGRE_RTShaderSystem_LIBRARIES}
    ${OPENAL_LIBRARY}
    ${OIS_LIBRARIES}
    ${CEGUI_LIBRARIES}
)

target_link_libraries(${PROJECT_BINARY_NAME} OgreOverlay)

# MSVC automatically links boost
if(NOT MSVC)
    target_link_libraries(${PROJECT_BINARY_NAME} ${Boost_LIBRARIES})
endif()

# Link sfml
# Use debug libraries if they exist
if(${SFML_AUDIO_LIBRARY_SHARED_DEBUG})
    target_link_libraries(
        ${PROJECT_BINARY_NAME}

        optimized ${SFML_AUDIO_LIBRARY_SHARED_NONDEBUG}
        optimized ${SFML_SYSTEM_LIBRARY_SHARED_NONDEBUG}
        debug ${SFML_AUDIO_LIBRARY_SHARED_DEBUG}
        debug ${SFML_SYSTEM_LIBRARY_SHARED_DEBUG}
    )
else()
    target_link_libraries(${PROJECT_BINARY_NAME}
        ${SFML_AUDIO_LIBRARY_SHARED_NONDEBUG}
        ${SFML_SYSTEM_LIBRARY_SHARED_NONDEBUG})
endif()

# Link pthreads. (And also userenv if we are on windows.)
if(WIN32)
    if(MSVC_IDE)
        #Set some extra compiler flags
        #TODO - investigate if these are what they should be
        set( PLATFORM_C_FLAGS "/W3 /MD /Od /D \"WIN32\" /D \"_WINDOWS\" /Gm /Gy /fp:fast /ZI /EHsc" )
        set( PLATFORM_C_FLAGS_DEBUG "/W3 /MDd /Od /Gm /Gy /fp:fast /ZI /DOD_DEBUG" )

        set( CMAKE_CXX_FLAGS "${PLATFORM_C_FLAGS}" )
        set( CMAKE_CXX_FLAGS_RELEASE "${PLATFORM_C_FLAGS}" )
        set( CMAKE_CXX_FLAGS_DEBUG "${PLATFORM_C_FLAGS_DEBUG}" )

        #Link to pthreads
        target_link_libraries(
            ${PROJECT_BINARY_NAME}

            "pthreadVC2.lib"
            "ws2_32.lib"
            Userenv
        )
        message( STATUS "Using win pthreads" )
    elseif(MINGW)
        target_link_libraries(
            ${PROJECT_BINARY_NAME}

            "libpthreadGC2.a"
            "ws2_32"
            Userenv
        )

    endif()
else()
    target_link_libraries (${PROJECT_BINARY_NAME} ${CMAKE_THREAD_LIBS_INIT})
endif()


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    add_definitions("-DOD_DEBUG")
endif()

##################################
#### Configure settings files ####
##################################

#Make a copy for use in the build directory, and later one copy for installing.
configure_file(
    ${CMAKE_CONFIG_DIR}/resources.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/resources.cfg
)

configure_file(
    ${CMAKE_CONFIG_DIR}/resources.zip.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/resources.zip.cfg
)

if(WIN32)
    #On windows, use current directory for plugins and data for now
    set(OPENDUNGEONS_OGRE_PLUGIN_DIR_REL "plugins")
    set(OPENDUNGEONS_OGRE_PLUGIN_DIR_DBG "plugins")
    set(OPENDUNGEONS_DATA_PATH ".")
    set(OPENDUNGEONS_DATA_DEST ".")
else()
    #only use d3d renderer plugins if we are on windows
    set(OPENDUNGEONS_COMMENT_D3D "#")
    #On linux, we should look in the standard paths for plugins
    if("${OGRE_PLUGIN_DIR_REL}" STREQUAL "NOTFOUND")
        #Try pkgconfig if the ogre module doesn't set the plugin paths
        find_package(PkgConfig)
        if(PKG_CONFIG_FOUND)
            execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} OGRE --variable=plugindir
                OUTPUT_VARIABLE OD_PLUGIN_DIR_TEMP
                RESULT_VARIABLE OD_PKGCONFIG_FAILED
                ERROR_VARIABLE  OD_PKGCONFIG_ERROR)
            if(OD_PKGCONFIG_FAILED)
                message(STATUS "Failed to run pkgconfig when looking for plugin directory" ${OD_PLUGIN_DIR_TEMP} " Error:" ${OD_PKGCONFIG_ERROR})
                get_filename_component(OPENDUNGEONS_OGRE_PLUGIN_DIR_REL ${OGRE_RenderSystem_GL_LIBRARY_REL} PATH)
            else()
                set(OPENDUNGEONS_OGRE_PLUGIN_DIR_REL ${OD_PLUGIN_DIR_TEMP})
                set(OPENDUNGEONS_OGRE_PLUGIN_DIR_DBG ${OD_PLUGIN_DIR_TEMP})
            endif()
        endif()
    else()
        set(OPENDUNGEONS_OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_REL})
        set(OPENDUNGEONS_OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_DBG})
    endif()

    message(STATUS "Plugin path rel: " ${OPENDUNGEONS_OGRE_PLUGIN_DIR_REL})
    message(STATUS "Plugin path dbg: " ${OPENDUNGEONS_OGRE_PLUGIN_DIR_DBG})

    #Set data location to where we install if we want to use the installer
    set(OPENDUNGEONS_DATA_DEST share/games/${PROJECT_NAME})
    set(OPENDUNGEONS_DATA_PATH ${CMAKE_INSTALL_PREFIX}/${OPENDUNGEONS_DATA_DEST} CACHE PATH "")
endif()

#Do the configuration
configure_file(${CMAKE_CONFIG_DIR}/plugins.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/plugins.cfg)
configure_file(${CMAKE_CONFIG_DIR}/plugins_d.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/plugins_d.cfg)
configure_file(${CMAKE_CONFIG_DIR}/resources.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/resources_install.cfg)
configure_file(${CMAKE_CONFIG_DIR}/resources.zip.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/resources_install.zip.cfg)
if(UNIX)
    #On linux, set up the launcher script
    #TODO - add key repeat thing
    set(OPENDUNGEONS_BINARY_PATH ${CMAKE_INSTALL_PREFIX}/games/${PROJECT_BINARY_NAME} CACHE PATH "")
    configure_file(${CMAKE_CONFIG_DIR}/OpenDungeons.in ${CMAKE_CURRENT_BINARY_DIR}/OpenDungeons)
endif()

##################################
#### Installation ################
##################################

#(This is currently not used)

set(OPENDUNGEONS_CONFIGFILES ${CMAKE_CURRENT_SOURCE_DIR}/plugins.cfg)

install(FILES ${OPENDUNGEONS_CONFIGFILES} DESTINATION ${OPENDUNGEONS_DATA_DEST})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/resources_install.cfg DESTINATION ${OPENDUNGEONS_DATA_DEST} RENAME resources.cfg)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/resources_install.zip.cfg DESTINATION ${OPENDUNGEONS_DATA_DEST} RENAME resources.zip.cfg)

if(NOT WIN32)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenDungeons DESTINATION ${BINDIR} PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()

##################################
#### Copy files to binary dir ####
##################################

# Copy level and scripts dir from git to build dir if this is not an in-source build
if( NOT ${CMAKE_CURRENT_SOURCE_DIR} EQUAL ${CMAKE_CURRENT_BINARY_DIR})
    if (EXISTS "levels/Test.level")
        configure_file(levels/Test.level ${CMAKE_CURRENT_BINARY_DIR}/levels/Test.level)
    endif()
    file(COPY scripts DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()

##################################
#### Packaging ###################
##################################

#Not used at the moment, more flexible to do the deb packages manually
#TODO - set up for making tarballs
set(CPACK_SOURCE_IGNORE_FILES "~$" "${CMAKE_SOURCE_DIR}.*/.svn/" "${CMAKE_SOURCE_DIR}/debian/")
set(CPACK_PACKAGE_NAME opendungeons)
set(CPACK_PACKAGE_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
set(CPACK_PACKAGE_CONTACT OpenDungeons Team)
set(CPACK_GENERATOR "DEB")
set(CPACK_SOURCE_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcegui (>= 0.8.3), libois-1.2.0, libsfml-audio2.0, libopenal1, libogremain-1.9.0")
include(CPack)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 17 Mar 2014, 22:28

Dear Bertram,

This is quite a curious case you put forward since this is based on the _else_ branch of the (win32 and $ogre_found) expression. Since 'win32' is probably true, I'm guessing ogre_found on that systsem may not be true. Still, the system should complain about ogre under those conditions and not some boost error.

The original has it checked under the condition (MINGW). I assumed a system using the 'mingw' compiler also falls under the 'win32' platform. If anyone could comment on this assumption I would be grateful. I guess this to be wrong. In that case I can change the code to work for 'not win32' instead of as an else branch for the previous statement.

Also, related to the ambiguities regarding the OGRE_PLUGIN_DIR_REL variable. I have a few ideas, but it would help if you could provide me with the CMakeCache.txt file on both platforms (and please the state of that particular line), so i can compare it with my and pauls' files and draw some conclusions on them?

(note, among things, this file contains path information. You may want to check its contents before sending it in case it may include more sensitive information)
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Patch dependancy version check for CMake

Postby Bertram » 17 Mar 2014, 23:14

Hi nido! :)

This is quite a curious case you put forward since this is based on the _else_ branch of the (win32 and $ogre_found) expression. Since 'win32' is probably true, I'm guessing ogre_found on that systsem may not be true. Still, the system should complain about ogre under those conditions and not some boost error.

If you're speaking about the 'find package boost' cmake statement. The problem is rather simple. Cmake has got a hard time finding libboost libraries when it is compiled from source with the msvc compiler. It seems to be a cmake bug from what I could read but if you got something saying otherwise, feel free to tell.

I'll try to give you the CMakeCache asap, just in case I'm wrong, though.

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 18 Mar 2014, 00:58

If you're speaking about the 'find package boost' cmake statement.


That is correct. Apologies for not being more clear about this. Perhaps it may even make sense to rebuild the CMakeLists.txt file in a simpler fashion assuming we are removing mingw support and rebuilding dependencies. Regardless, the CMakeCache.txt file would allow me to more acurately predict results on your platform for my changes.
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Patch dependancy version check for CMake

Postby Bertram » 18 Mar 2014, 09:33

Perhaps it may even make sense to rebuild the CMakeLists.txt file in a simpler fashion assuming we are removing mingw support and rebuilding dependencies.

I had a doubt about removing mingw support, since I've spent a lot of time trying to add it, and with the hope that someday, Ogre and CEGui will ease more the compiling between themselves when using gnu tools.
Yet, I must say you're right, mingw support doesn't work, so we shouldn't had false clues that it does, and this will likely permit simplifications.

On another hand, please, don't work on that now, as I'd like Paul to try the CMakeLists.txt file I've just provided, which would provide your latest additions along with a common solution to the cmake problem we, Paul and me, had to make it work for both of us.
Once we're ok with that change and that it is pushed, let's resume with this.

I'll give you the cache asap.

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby paul424 » 19 Mar 2014, 19:46

Sorry I was away from internet due to problems with ISP and my router :D.
Your CMake* script works , you can push it to git , cheers.
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Patch dependancy version check for CMake

Postby Bertram » 19 Mar 2014, 20:25

Hi, :)

Sorry I was away from internet due to problems with ISP and my router :D.

Np :)

Your CMake* script works , you can push it to git , cheers.

This is great! I've pushed it.
@Nido: If you're still willing to do so, you can resume working on CMake script improvements. :)
I'll test the new dependency versions asap.

Btw, here is the CMakeCache.txt file requested, Nido: :)
CMakeCache.txt
CMakeCache.txt file of a Windows build
(43.16 KiB) Downloaded 391 times


Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Patch dependancy version check for CMake

Postby nido » 19 Mar 2014, 23:37

Bertram {l Wrote}:Btw, here is the CMakeCache.txt file requested, Nido: :)


Thanks. I will study it this weekend and work on the cmakelists. Paul, may I also request your cmakecache.txt file so i can compare all three of our build environments?
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Who is online

Users browsing this forum: No registered users and 1 guest