Skip to content

Commit

Permalink
windows build stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 20, 2021
1 parent 6e1293a commit a223ce9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 28 deletions.
16 changes: 5 additions & 11 deletions plugins/draco/CMakeLists.txt
Expand Up @@ -5,6 +5,11 @@ if (NOT Draco_FOUND)
message(FATAL_ERROR "Can't find Draco support required.")
endif()

if (WIN32)
add_definitions(-DNOMINMAX)
endif()


#
# Draco Reader
#
Expand All @@ -19,9 +24,6 @@ PDAL_ADD_PLUGIN(reader_libname reader draco
)

target_link_directories(${reader_libname} PRIVATE ${draco_LIBRARY_DIR})
if (WIN32)
target_compile_definitions(${reader_libname} PRIVATE -DNONMINMAX=1)
endif()

#
# Draco Writer
Expand All @@ -39,9 +41,6 @@ PDAL_ADD_PLUGIN(writer_libname writer draco

target_link_directories(${writer_libname} PRIVATE ${draco_LIBRARY_DIR})

if (WIN32)
target_compile_definitions(${writer_libname} PRIVATE -DNONMINMAX=1)
endif()

if (WITH_TESTS)

Expand Down Expand Up @@ -72,9 +71,4 @@ if (WITH_TESTS)
target_link_directories(pdal_io_draco_reader_test PRIVATE ${draco_LIBRARY_DIR})


if (WIN32)
target_compile_definitions(pdal_io_draco_writer_test PRIVATE -DNONMINMAX=1)
target_compile_definitions(pdal_io_draco_reader_test PRIVATE -DNONMINMAX=1)
endif()

endif()
2 changes: 0 additions & 2 deletions plugins/draco/io/DracoReader.hpp
Expand Up @@ -34,8 +34,6 @@

#pragma once

#define NOMINMAX

#include <iostream>

#include <pdal/Reader.hpp>
Expand Down
2 changes: 0 additions & 2 deletions plugins/draco/test/DracoReaderTest.cpp
Expand Up @@ -32,8 +32,6 @@
* OF SUCH DAMAGE.
****************************************************************************/

#define NOMINMAX

#include <pdal/Filter.hpp>
#include <pdal/pdal_test_main.hpp>

Expand Down
2 changes: 0 additions & 2 deletions plugins/draco/test/DracoWriterTest.cpp
Expand Up @@ -32,8 +32,6 @@
* OF SUCH DAMAGE.
****************************************************************************/

#define NOMINMAX

#include <stdio.h>
#include <sys/types.h>

Expand Down
15 changes: 4 additions & 11 deletions plugins/tiledb/CMakeLists.txt
Expand Up @@ -6,6 +6,10 @@ if (NOT TILEDB_FOUND)
message(FATAL_ERROR "Can't find TileDB support required.")
endif()

if (WIN32)
add_definitions(-DNOMINMAX)
endif()

#
# TileDB Reader
#
Expand All @@ -19,10 +23,6 @@ PDAL_ADD_PLUGIN(reader_libname reader tiledb
${NLOHMANN_INCLUDE_DIR}
)

if (WIN32)
target_compile_definitions(${reader_libname} PRIVATE -DNONMINMAX)
endif()

#
# TileDB Writer
#
Expand All @@ -37,9 +37,6 @@ PDAL_ADD_PLUGIN(writer_libname writer tiledb
${NLOHMANN_INCLUDE_DIR}
)

if (WIN32)
target_compile_definitions(${writer_libname} PRIVATE -DNONMINMAX)
endif()

if (WITH_TESTS)
PDAL_ADD_TEST(pdal_io_tiledb_writer_test
Expand All @@ -64,9 +61,5 @@ if (WITH_TESTS)
${TILEDB_INCLUDE_DIR}
)

if (WIN32)
target_compile_definitions(pdal_io_tiledb_writer_test PRIVATE -DNONMINMAX)
target_compile_definitions(pdal_io_tiledb_reader_test PRIVATE -DNONMINMAX)
endif()

endif()

0 comments on commit a223ce9

Please sign in to comment.