summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov <yselkowitz@users.sourceforge.net>2011-10-27 14:42:40 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-10-27 14:42:40 -0200
commitb6f64d342c0dd3926eb675c75f040d12840a9043 (patch)
treee0bbf653791588a45bc35240957c36dd64e88026
parentc09b41d09861d1b2ac801188d92fce84aa3114f5 (diff)
Fix bug 1009 - "GeneratorRunner Cygwin patch"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--CMakeLists.txt2
-rw-r--r--data/GeneratorRunnerConfig.cmake.in2
-rw-r--r--generatorrunnermacros.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b641f44a..a5b60abe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
else()
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimize library size and performance. Only available on Release Mode" 0)
- if (CMAKE_HOST_UNIX)
+ if (CMAKE_HOST_UNIX AND NOT CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
diff --git a/data/GeneratorRunnerConfig.cmake.in b/data/GeneratorRunnerConfig.cmake.in
index f8bc898b..cf973e2a 100644
--- a/data/GeneratorRunnerConfig.cmake.in
+++ b/data/GeneratorRunnerConfig.cmake.in
@@ -6,6 +6,8 @@
SET(GENERATORRUNNER_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/generatorrunner@generator_SUFFIX@")
if(MSVC)
SET(GENERATORRUNNER_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@genrunner@generator_SUFFIX@.lib")
+elseif(CYGWIN)
+ SET(GENERATORRUNNER_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_IMPORT_LIBRARY_PREFIX@genrunner@generator_SUFFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
elseif(WIN32)
SET(GENERATORRUNNER_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@genrunner@generator_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
else()
diff --git a/generatorrunnermacros.h b/generatorrunnermacros.h
index abce21de..9dfdca3d 100644
--- a/generatorrunnermacros.h
+++ b/generatorrunnermacros.h
@@ -25,7 +25,7 @@
#define GENERATORRUNNERMACROS_H
// GENRUNNER_API is used for the public API symbols.
-#if defined _WIN32 || defined __CYGWIN__
+#if defined _WIN32
#define GENRUNNER_EXPORT __declspec(dllexport)
#if GENRUNNER_EXPORTS
#define GENRUNNER_API GENRUNNER_EXPORT