Skip to content

Commit

Permalink
Export proj target to scope visible for test/unit target
Browse files Browse the repository at this point in the history
Refines #1034
  • Loading branch information
mloskot committed Jun 7, 2018
1 parent ffd4674 commit 95a1efb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib_proj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ set_target_properties(${PROJ_CORE_TARGET}
##############################################
# Link properties
##############################################
set(PROJ_LIBRARIES ${PROJ_CORE_TARGET} )
set(PROJ_LIBRARIES ${PROJ_CORE_TARGET})
set(PROJ_LIBRARIES ${PROJ_LIBRARIES} PARENT_SCOPE) # hack, required for test/unit
if(UNIX)
find_library(M_LIB m)
if(M_LIB)
Expand Down
4 changes: 3 additions & 1 deletion test/unit/basic_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
****************************************************************************/

#include "gtest_include.h"
#include <proj.h>

namespace {

// ---------------------------------------------------------------------------

TEST( dumy, dummy ) {
ASSERT_EQ( 1 , 1 );
PJ* p = ::proj_create(PJ_DEFAULT_CTX, "+proj=merc +ellps=clrk66 +lat_ts=33");
ASSERT_NE(p, nullptr);
}

} // namespace

0 comments on commit 95a1efb

Please sign in to comment.