google / liquidfun

2D physics engine for games

Home Page:http://google.github.io/liquidfun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't generate solution for VS2017

tinyleolin opened this issue · comments

Just clone this repository.

cmake --version

cmake version 3.12.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Build Command

cd liquidfun/Box2D
cmake -G "Visual Studio 15 2017 Win64"

CMake Output

...
CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "ARCHIVE_OUTPUT_DIRECTORY" is not allowed.

CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "LIBRARY_OUTPUT_DIRECTORY" is not allowed.

CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "RUNTIME_OUTPUT_DIRECTORY" is not allowed.

CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "ARCHIVE_OUTPUT_DIRECTORY" is not allowed.

CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "LIBRARY_OUTPUT_DIRECTORY" is not allowed.

CMake Error at CMakeLists.txt:165 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "RUNTIME_OUTPUT_DIRECTORY" is not allowed.

-- Configuring incomplete, errors occurred!

It seems that some libraries are imported/interface, thus ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY and RUNTIME_OUTPUT_DIRECTORY are not allowed.
Any advice would be apreciated.

Just comment out the following lines in liquidfun/Box2D/CMakeLists.txt and it works for the present. (Though it's of cause not perfect...)
line 164-170

# foreach(target ${ALL_TARGETS})
#   set_target_properties(
#     ${target} PROPERTIES
#     ARCHIVE_OUTPUT_DIRECTORY "${LIB_OUTPUT_DIR}"
#     LIBRARY_OUTPUT_DIRECTORY "${LIB_OUTPUT_DIR}"
#     RUNTIME_OUTPUT_DIRECTORY "${EXE_OUTPUT_DIR}")
# endforeach(target)

line 74

  # set(C_FLAGS_WARNINGS "/W4 /WX")

Build Command

cd liquidfun/Box2D
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" ..