Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake MSVC doesn't work #992

Closed
brandonros opened this issue Nov 5, 2021 · 1 comment
Closed

CMake MSVC doesn't work #992

brandonros opened this issue Nov 5, 2021 · 1 comment

Comments

@brandonros
Copy link

cmake_minimum_required(VERSION 3.5.1)
project(redis-rpc)
set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_OSX_ARCHITECTURES "x86_64")
# variables
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
set(BUILD_TESTS OFF CACHE BOOL "")
set(DISABLE_TESTS ON CACHE BOOL "")
set(BUILD_EXAMPLES OFF CACHE BOOL "")
set(MSGPACK_USE_STATIC_BOOST ON CACHE BOOL "")
# dependencies
add_subdirectory("deps/boost-cmake")
add_subdirectory("deps/dlfcn-win32")
add_subdirectory("deps/libconfig")
add_subdirectory("deps/hiredis")
add_subdirectory("deps/msgpack-c")
include_directories("deps/msgpack-c/include")
include_directories("deps/libconfig/lib")
# vehicle
add_executable(
  vehicle
  src/vehicle.cc
  src/redis.cc
  src/convert.cc
)
target_link_libraries(
  vehicle
  hiredis
  msgpackc-cxx
  config
  #libconfig
  #shlwapi
  dl
)
# tester
add_library(
  tester
  SHARED
  src/tester.cc
  src/redis.cc
  src/convert.cc
)
target_link_libraries(
  tester
  hiredis
  msgpackc-cxx
  config
  #libconfig
  #shlwapi
  dl
)
cmake -A Win32 -S . -B "Win32" && cmake --debug-output --build Win32 --config Debug 
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.28.29335.0
-- The CXX compiler identification is MSVC 19.28.29335.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Fetching Boost
-- Fetching Boost - done
-- Boost found: 1.71.0 C:/Users/Brandon/Desktop/redis-j2534-rpc/Win32/_deps/boost-src
-- Looking for __linux__
-- Looking for __linux__ - not found
-- Looking for _WIN32
-- Looking for _WIN32 - found
-- Looking for __APPLE__
-- Looking for __APPLE__ - not found
-- Looking for __ANDROID__
-- Looking for __ANDROID__ - not found
-- Looking for __FreeBSD__
-- Looking for __FreeBSD__ - not found
-- Looking for _M_IX86
-- Looking for _M_IX86 - found
-- Looking for __GNUC__
-- Looking for __GNUC__ - not found
-- The ASM_MASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x86/ml.exe
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) 
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
-- Found the following ICU libraries:
--   uc (required)
--   dt (required)
--   i18n (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR ICU_LIBRARY)
Detected version: 1.0.3
-- Staticly linking with Boost
CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.21/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args)
  deps/msgpack-c/CMakeLists.txt:103 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "C:/Users/Brandon/Desktop/redis-j2534-rpc/Win32/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Brandon/Desktop/redis-j2534-rpc/Win32/CMakeFiles/CMakeError.log".

@brandonros
Copy link
Author

I guess related to Orphis/boost-cmake#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant