Skip to content

Commit

Permalink
Merge pull request #217 from dartsim/windows_support
Browse files Browse the repository at this point in the history
Fix supporting Visual Studio with DART-Prerequisites installation package
  • Loading branch information
jslee02 committed Jul 8, 2014
2 parents 3007417 + edf2a8f commit 47481df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ message(STATUS "CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}")

option(ENABLE_OPENMP "Build with OpenMP parallaization enabled" ON)
option(BUILD_CORE_ONLY "Build only the core of DART" OFF)
if(NOT MSVC)
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
if(MSVC)
set(RUNTIME_LIBRARY "/MD" CACHE STRING "BaseName chosen by the user at CMake configure time")
set_property(CACHE RUNTIME_LIBRARY PROPERTY STRINGS /MD /MT)
elseif()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()

###############
Expand All @@ -42,8 +45,8 @@ endif()

if(MSVC)
message(STATUS "Setup Visual Studio Specific Flags")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /Zi /Gy /W1 /EHsc")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD /Zi /GL /Gy /W1 /EHsc /arch:SSE2")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${RUNTIME_LIBRARY}d /Zi /Gy /W1 /EHsc")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG")
elseif(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -msse2 -fPIC")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindFCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ find_path(FCL_INCLUDE_DIR fcl/collision.h
set(FCL_INCLUDE_DIRS ${FCL_INCLUDE_DIR})

if(MSVC)
set(FCL_LIBRARIES optimized fcl ccd debug fcld ccdd)
set(FCL_LIBRARIES optimized fcl optimized ccd debug fcld debug ccdd)
else()
find_library(FCL_LIBRARY fcl)
find_library(CCD_LIBRARY ccd)
Expand Down

0 comments on commit 47481df

Please sign in to comment.