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

Fixed missing installation of export.hpp and include_symbols.hpp and missing compile def #1

Merged
merged 1 commit into from
Sep 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ set(CAFFE_TARGET_VERSION "1.0.0-rc3")
set(CAFFE_TARGET_SOVERSION "1.0.0-rc3")
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})

# definition needed to include CMake generated files
add_definitions(-DCMAKE_WINDOWS_BUILD)

# ---[ Download or resolve the provided dependencies folder

if( MSVC )
set(WITH_PREBUILD_MSVC_DEPENDENCIES ON CACHE BOOL "Use the pre-built dependencies. Note that this can only work for Visual Studio 2013 x64.")
else()
set(WITH_PREBUILD_MSVC_DEPENDENCIES OFF)
endif()

# ---[ Using cmake scripts and modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)

Expand Down
7 changes: 6 additions & 1 deletion src/caffe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ elseif(MSVC AND NOT BUILD_SHARED_LIBS)
windows_create_link_header(caffe ${caffe_symbols_hdr})
get_filename_component(_name ${caffe_symbols_hdr} NAME)
set(CAFFE_INCLUDE_SYMBOLS "#include \"caffe/${_name}\"")
target_compile_definitions(caffe PRIVATE ${_caffe_static_compile_def})
# definition needed to include CMake generated files
target_compile_definitions(caffe PRIVATE ${_caffe_static_compile_def}
PUBLIC -DCMAKE_WINDOWS_BUILD)
endif()

configure_file(${caffe_export_hdr_in} ${caffe_export_hdr})
Expand All @@ -83,6 +85,9 @@ configure_file(${caffe_export_hdr_in} ${caffe_export_hdr})
install(DIRECTORY ${Caffe_INCLUDE_DIR}/caffe DESTINATION include)
install(FILES ${proto_hdrs} DESTINATION include/caffe/proto)
install(TARGETS caffe proto EXPORT CaffeTargets DESTINATION lib)
if(MSVC AND NOT BUILD_SHARED_LIBS)
install(FILES ${caffe_export_hdr} ${caffe_symbols_hdr} DESTINATION include/caffe)
endif()

file(WRITE ${PROJECT_BINARY_DIR}/__init__.py)
list(APPEND proto_python ${PROJECT_BINARY_DIR}/__init__.py)
Expand Down