Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Commit

Permalink
Fix WindowsStore build
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Feb 21, 2019
1 parent 5801940 commit 6790b71
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ set(local_lib_name bz2)

option(BUILD_TESTING "Build the tests." ON)

string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "WindowsStore" is_windows_store)

if (MSVC)
if (NOT DEFINED ARCH)
set (ARCH ${MSVC_C_ARCHITECTURE_ID})
Expand Down Expand Up @@ -95,15 +97,16 @@ if(MSVC)
set_target_properties(${local_lib_name} PROPERTIES PDB_NAME "${local_lib_name}${MSVC_SHARED_SUFFIX_BASE}")
endif()

# bzip2recover
add_executable(bzip2recover bzip2recover.c)
target_link_libraries(bzip2recover bz2)

# bzip2
add_executable(bzip2_bin bzip2.c)
target_link_libraries(bzip2_bin bz2)
set_target_properties(bzip2_bin PROPERTIES OUTPUT_NAME bzip2)
if(NOT is_windows_store)
# bzip2recover
add_executable(bzip2recover bzip2recover.c)
target_link_libraries(bzip2recover bz2)

# bzip2
add_executable(bzip2_bin bzip2.c)
target_link_libraries(bzip2_bin bz2)
set_target_properties(bzip2_bin PROPERTIES OUTPUT_NAME bzip2)
endif()

file(GLOB man1 ${bzip2_SOURCE_DIR}/*.1)

Expand Down Expand Up @@ -213,7 +216,7 @@ write_basic_package_version_file(
configure_file("cmake/Config.cmake.in" "${project_config}" @ONLY)

set(targets_to_install bz2)
if(NOT IOS)
if(NOT IOS AND NOT is_windows_store)
list(APPEND targets_to_install bzip2recover bzip2_bin)
endif()

Expand Down

0 comments on commit 6790b71

Please sign in to comment.