Skip to content

Commit

Permalink
Trying to build windows again
Browse files Browse the repository at this point in the history
  • Loading branch information
msoos committed Feb 27, 2024
1 parent b946397 commit a756cc7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
13 changes: 0 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,19 +322,6 @@ endif()
# -----------------------------------------------------------------------------
set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html

option(NOZLIB "Don't use zlib" OFF)
if (NOT NOZLIB AND NOT (STATICCOMPILE AND WIN32))
find_package(ZLIB)
IF (ZLIB_FOUND)
MESSAGE(STATUS "OK, Found ZLIB!")
include_directories(${ZLIB_INCLUDE_DIR})
link_directories(${ZLIB_LIB_DIR})
add_definitions( -DUSE_ZLIB )
ELSE (ZLIB_FOUND)
MESSAGE(STATUS "WARNING: Did not find ZLIB, gzipped file support will be disabled")
ENDIF (ZLIB_FOUND)
endif()

# add compile defines
set(COMPILE_DEFINES)
foreach( d ${DirDefs} )
Expand Down
12 changes: 2 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp" @ONLY)

SET(SOURCES
add_library(sbva
sbva.cpp
${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp)

ADD_LIBRARY(sbva ${SOURCES} ${LIB})

set_target_properties(sbva PROPERTIES
PUBLIC_HEADER "${sbva_public_headers}"
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
Expand All @@ -57,13 +55,7 @@ set_target_properties(sbva PROPERTIES
add_executable (sbva-bin main.cpp)
add_executable (test test.cpp)

set(sbva_exec_link_libs sbva)

IF (ZLIB_FOUND)
SET(sbva_exec_link_libs ${sbva_exec_link_libs} ${ZLIB_LIBRARY})
ENDIF()

target_link_libraries(sbva-bin ${sbva_exec_link_libs})
target_link_libraries(sbva-bin sbva)
target_link_libraries(test sbva)

set_target_properties(test PROPERTIES
Expand Down
1 change: 0 additions & 1 deletion src/GitSHA1.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const char* SBVAImpl::get_compilation_env()
"CMAKE_CXX_FLAGS = @CMAKE_CXX_FLAGS@ | "
"COMPILE_DEFINES = @COMPILE_DEFINES@ | "
"STATICCOMPILE = @STATICCOMPILE@ | "
"ZLIB_FOUND = @ZLIB_FOUND@ | "
"ENABLE_ASSERTIONS = @ENABLE_ASSERTIONS@ | "
;
return compilation_env;
Expand Down

0 comments on commit a756cc7

Please sign in to comment.