aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-18 17:09:07 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-19 11:30:43 -0300
commit5f465d1eedff7727d005e2724dbc56960b0f313b (patch)
tree83f7fdf104af74c04626105c61560dab1782e3d7 /CMakeLists.txt
parent1b89ed5df330e4588838de36a7bbf11e595158e2 (diff)
Use DEFINE_SYMBOL in cmake to create the define to exports symbols.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2ba54a60..7804e7db6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,10 +8,12 @@ find_package(ApiExtractor 0.7 REQUIRED)
option(BUILD_TESTS "Build tests." TRUE)
if(MSVC)
- set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /EHsc /DWIN32 /D_WINDOWS /DGENRUNNER_BUILD /D_SCL_SECURE_NO_WARNINGS")
-elseif(CMAKE_HOST_UNIX)
+ 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)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
+ if (CMAKE_HOST_UNIX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
+ endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
if(ENABLE_GCC_OPTIMIZATION)
set(CMAKE_BUILD_TYPE Release)
@@ -51,7 +53,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR})
add_library(genrunner SHARED generator.cpp)
-set_target_properties(genrunner PROPERTIES VERSION ${generator_VERSION})
+set_target_properties(genrunner PROPERTIES VERSION ${generator_VERSION} DEFINE_SYMBOL GENRUNNER_EXPORTS)
target_link_libraries(genrunner ${QT_QTCORE_LIBRARY} ${APIEXTRACTOR_LIBRARY})
set_target_properties(genrunner PROPERTIES VERSION ${generator_VERSION} SOVERSION ${generator_SOVERSION})