certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi libHLA/CMakeLists.txt scripts/SystemSpeci...


From: CERTI CVS commits
Subject: [certi-cvs] certi libHLA/CMakeLists.txt scripts/SystemSpeci...
Date: Sun, 18 Dec 2011 13:28:09 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      11/12/18 13:28:09

Modified files:
        libHLA         : CMakeLists.txt 
        scripts        : SystemSpecificInformations.cmake 
                         Toolchain-cross-mingw32-linux.cmake 
                         FindLexYacc.cmake 
        libCERTI       : CMakeLists.txt 
        .              : CMakeLists.txt 

Log message:
        Some small change in order to enable cross-compilling
        (at least from Linux to Win32)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/CMakeLists.txt?cvsroot=certi&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/SystemSpecificInformations.cmake?cvsroot=certi&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/Toolchain-cross-mingw32-linux.cmake?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/FindLexYacc.cmake?cvsroot=certi&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/certi/CMakeLists.txt?cvsroot=certi&r1=1.109&r2=1.110

Patches:
Index: libHLA/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libHLA/CMakeLists.txt,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- libHLA/CMakeLists.txt       14 Sep 2011 20:32:57 -0000      1.16
+++ libHLA/CMakeLists.txt       18 Dec 2011 13:28:08 -0000      1.17
@@ -22,11 +22,11 @@
 
 # Currently TLSF does not compile as-is on WIN32
 IF (NOT WIN32)
-SET(LIBHLA_ALLOC_SRCS tlsf.c tlsf.h tlsf_target.h)
-LIST(APPEND LIBHLA_EXPORTED_INCLUDES tlsf.h)
-set_source_files_properties(tlsf.c tlsf.h tlsf_target.h PROPERTIES LANGUAGE 
"C")
-set_source_files_properties(tlsf.c tlsf.h tlsf_target.h PROPERTIES CFLAGS 
"-Wextra -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wno-long-long -Wstrict-aliasing=2")
-SOURCE_GROUP("Source Files\\Alloc" FILES ${LIBHLA_ALLOC_SRCS})
+  SET(LIBHLA_ALLOC_SRCS tlsf.c tlsf.h tlsf_target.h)
+  LIST(APPEND LIBHLA_EXPORTED_INCLUDES tlsf.h)
+  set_source_files_properties(tlsf.c tlsf.h tlsf_target.h PROPERTIES LANGUAGE 
"C")
+  set_source_files_properties(tlsf.c tlsf.h tlsf_target.h PROPERTIES CFLAGS 
"-Wextra -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wno-long-long -Wstrict-aliasing=2")
+  SOURCE_GROUP("Source Files\\Alloc" FILES ${LIBHLA_ALLOC_SRCS})
 ENDIF (NOT WIN32)
 
 SET(LIBHLA_MB_SRCS MessageBuffer.cc MessageBuffer.hh MsgBuffer.c MsgBuffer.h)

Index: scripts/SystemSpecificInformations.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/SystemSpecificInformations.cmake,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- scripts/SystemSpecificInformations.cmake    14 Mar 2011 12:56:46 -0000      
1.9
+++ scripts/SystemSpecificInformations.cmake    18 Dec 2011 13:28:08 -0000      
1.10
@@ -49,6 +49,11 @@
     set(SPECIFIC_SYSTEM_VERSION_NAME "Win7")
   endif(CMAKE_SYSTEM_VERSION MATCHES "6.1")
 
+  # Cross-compiling
+  if (CMAKE_CROSSCOMPILING)
+     set(SPECIFIC_SYSTEM_VERSION_NAME "cross_${CMAKE_HOST_SYSTEM_NAME}")
+  endif()
+
   # Compilers
   # taken from http://predef.sourceforge.net/precomp.html#sec34
   if(MSVC)

Index: scripts/Toolchain-cross-mingw32-linux.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/Toolchain-cross-mingw32-linux.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- scripts/Toolchain-cross-mingw32-linux.cmake 1 Feb 2011 12:51:18 -0000       
1.1
+++ scripts/Toolchain-cross-mingw32-linux.cmake 18 Dec 2011 13:28:09 -0000      
1.2
@@ -2,11 +2,12 @@
 SET(CMAKE_SYSTEM_NAME Windows)
 
 # which compilers to use for C and C++
-SET(CMAKE_C_COMPILER i686-pc-mingw32-gcc)
-SET(CMAKE_CXX_COMPILER i686-pc-mingw32-g++)
+SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
+SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
+SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
 
 # here is the target environment located
-SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32/sys-root/mingw)
+SET(CMAKE_FIND_ROOT_PATH  /usr/i586-mingw32msvc )
 
 # adjust the default behaviour of the FIND_XXX() commands:
 # search headers and libraries in the target environment, search 
@@ -14,4 +15,3 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-

Index: scripts/FindLexYacc.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/FindLexYacc.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- scripts/FindLexYacc.cmake   11 Dec 2008 13:51:03 -0000      1.5
+++ scripts/FindLexYacc.cmake   18 Dec 2011 13:28:09 -0000      1.6
@@ -55,6 +55,8 @@
    IF(LEX_FOUND)
         get_filename_component(PATH_LEX ${LEX_PROGRAM} PATH)
         get_filename_component(INCLUDE_LEX ${PATH_LEX} PATH)
+     if (NOT CMAKE_CROSSCOMPILING)
         INCLUDE_DIRECTORIES(${INCLUDE_LEX}/include)
+     endif()
    ENDIF(LEX_FOUND)
 ENDIF(WIN32)
\ No newline at end of file

Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- libCERTI/CMakeLists.txt     14 Sep 2011 20:32:57 -0000      1.37
+++ libCERTI/CMakeLists.txt     18 Dec 2011 13:28:09 -0000      1.38
@@ -184,9 +184,9 @@
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
 
 # FIXME we should FindGnuWin32 in the main CMakeList.txt
-IF (WIN32)
+if (WIN32 AND NOT CMAKE_CROSSCOMPILING)
     INCLUDE_DIRECTORIES("C:/Program Files/GnuWin32/include")
-ENDIF (WIN32)
+endif ()
 
 ADD_LIBRARY(CERTI
     ${CERTI_FEDERATION_SRCS}

Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/CMakeLists.txt,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- CMakeLists.txt      27 Oct 2011 07:59:51 -0000      1.109
+++ CMakeLists.txt      18 Dec 2011 13:28:09 -0000      1.110
@@ -285,12 +285,14 @@
     #FIND_LIBRARY(SOCKET_LIBRARY
        #                          NAMES Ws2_32
        #                       DOC "The Winsock2 library")
-       SET(SOCKET_LIBRARY Ws2_32)
+       SET(SOCKET_LIBRARY ws2_32)
        SET(HAVE_WIN_CLOCK 1)
 ENDIF (WIN32)
 
 ################ LIBXML2 install Check ####################
-FIND_PACKAGE(LibXml2)
+if (NOT CMAKE_CROSSCOMPILING)
+   FIND_PACKAGE(LibXml2)
+endif()
 IF (LIBXML2_FOUND)
     ADD_DEFINITIONS(-DHAVE_XML ${LIBXML2_DEFINITIONS})
     INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})



reply via email to

[Prev in Thread] Current Thread [Next in Thread]