Skip to content

Commit

Permalink
Always generate and include msuproj_export.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mentaljam committed Jan 13, 2016
1 parent 7f7b579 commit 7a3c904
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ option(WITH_UPDATES_ACTION "Check for updates action" ON)
#### Compiler flags
set(GCC_FLAGS "-std=gnu++11 -funroll-loops -O3 -Wframe-larger-than=1024 -fopenmp")
set(MSVC_FLAGS "/openmp")
if(NOT BUILD_SHARED_LIBS OR NOT MSVC)
add_definitions("-DMSUPROJ_STATIC_DEFINE=1")
endif()


############### Setting additional variables ###############
Expand Down Expand Up @@ -98,6 +101,8 @@ include(GDAL)
######## Library ########
include_directories(src/msuproj)
add_subdirectory(src/msuproj msuproj)
include(GenerateExportHeader)
generate_export_header(msuproj)

##### Applications ######
if(BUILD_CLI)
Expand Down
11 changes: 2 additions & 9 deletions src/msuproj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ endif()
add_library(msuproj ${MSUPROJ_SOURCES})
target_link_libraries(msuproj ${GDAL_LIBRARIES})

if(MSVC)
include(GenerateExportHeader)
generate_export_header(msuproj)
endif()

if(BUILD_SHARED_LIBS)

set_target_properties(msuproj
Expand Down Expand Up @@ -97,10 +92,8 @@ if(INSTALL_DEV)

# Headers
file(GLOB H_FILES *.h)
list(APPEND H_FILES ${CMAKE_BINARY_DIR}/msuproj_version.h)
if(MSVC)
list(APPEND H_FILES ${CMAKE_BINARY_DIR}/msuproj/msuproj_export.h)
endif()
list(APPEND H_FILES ${CMAKE_BINARY_DIR}/msuproj_version.h
${CMAKE_BINARY_DIR}/msuproj_export.h)
foreach(H_FILE ${H_FILES})
get_filename_component(H_FILE_NAME ${H_FILE} NAME)
set(OUT_H_FILE ${CMAKE_BINARY_DIR}/include/${H_FILE_NAME})
Expand Down
6 changes: 1 addition & 5 deletions src/msuproj/msucore.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
#define MSUCORE_H

#include <msuproj_version.h>
#if _MSC_VER && !__INTEL_COMPILER
# include <msuproj/msuproj_export.h>
#else
# define MSUPROJ_EXPORT
#endif
#include <msuproj_export.h>

#include <string>

Expand Down
2 changes: 2 additions & 0 deletions src/msuproj/msupixeltransformer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "msupixeltransformer.h"

#include <cstring>

msumr::PixelTransformer::PixelTransformer(const unsigned int &raster_x_size, const unsigned int &raster_y_size,
const unsigned int &gcpgrid_x_size, const unsigned int &gcpgrid_y_size,
GCP *gcps, double *geo_transform) :
Expand Down
2 changes: 2 additions & 0 deletions src/msuproj/msuproj.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <msuproj.h>
#include <logoimage.hpp>
#include <msugcpgrid.h>

#include <ogrsf_frmts.h>

#include <fstream>
#include <cfloat>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion src/msuproj/msuproj.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#ifndef MSUPROJ_H
#define MSUPROJ_H

#include <msucore.h>
#include <msugcpgrid.h>

#include <gdal_priv.h>

namespace msumr {

/**
Expand Down

0 comments on commit 7a3c904

Please sign in to comment.