Git Product home page Git Product logo

Comments (1)

jhasse avatar jhasse commented on June 2, 2024 2

Try this:

diff --git a/liquidfun/Box2D/CMakeLists.txt b/liquidfun/Box2D/CMakeLists.txt
index 4f2461c5..2329bb92 100644
--- a/liquidfun/Box2D/CMakeLists.txt
+++ b/liquidfun/Box2D/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.7)
 
 project(Box2D)
 
@@ -99,23 +99,6 @@ if (BOX2D_CODE_COVERAGE AND
   set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${GCOV_FLAGS}")
 endif()
 
-# The XCode generator ignores CMAKE_C_FLAGS AND CMAKE_CXX_FLAGS so flags
-# need to be added with target properties.
-# The following functions track the list of targets so that it's possible to
-# add flags to all targets using target properties.
-set(ALL_TARGETS "" CACHE INTERNAL "")
-# Override add_library() and adding the target to the ALL_TARGETS variable.
-function(add_library name)
-  _add_library(${name} ${ARGN})
-  set(ALL_TARGETS "${ALL_TARGETS}" "${name}" CACHE INTERNAL "")
-endfunction(add_library)
-
-# Override add_executable() and adding the target to the ALL_TARGETS variable.
-function(add_executable name)
-  _add_executable(${name} ${ARGN})
-  set(ALL_TARGETS "${ALL_TARGETS}" "${name}" CACHE INTERNAL "")
-endfunction(add_executable)
-
 # The Box2D library.
 add_subdirectory(Box2D)
 
@@ -141,7 +127,7 @@ endif(BOX2D_INSTALL_DOC)
 
 # Set the warning flags for all targets when using the Xcode generator.
 if(CMAKE_COMPILER_IS_CLANGXX)
-  foreach(target ${ALL_TARGETS})
+  foreach(target ${BUILDSYSTEM_TARGETS})
     set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS
                           "${C_FLAGS_WARNINGS}")
   endforeach(target)
@@ -161,7 +147,7 @@ endif()
 # Override / reset the output directory for all targets.
 set(LIB_OUTPUT_DIR "${OUTPUT_SUBDIR}")
 set(EXE_OUTPUT_DIR "${OUTPUT_SUBDIR}")
-foreach(target ${ALL_TARGETS})
+foreach(target ${BUILDSYSTEM_TARGETS})
   set_target_properties(
     ${target} PROPERTIES
     ARCHIVE_OUTPUT_DIRECTORY "${LIB_OUTPUT_DIR}"

from liquidfun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.