From a6a75b81d24b624b554a933732e98f8b076ded3c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 25 Apr 2015 20:36:48 +0000 Subject: [PATCH] [CMake] Update fltk-config generation for AIX (STR #3217). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10719 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CMake/variables.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMake/variables.cmake b/CMake/variables.cmake index e161ef9e9..d20964201 100644 --- a/CMake/variables.cmake +++ b/CMake/variables.cmake @@ -58,11 +58,12 @@ set(ARCHFLAGS ${OPTION_ARCHFLAGS}) string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_UPPER) if(${BUILD_UPPER}) - set(CFLAGS "${CMAKE_C_FLAGS_${BUILD_UPPER}} ${CFLAGS}") + set(CFLAGS "${CMAKE_C_FLAGS_${BUILD_UPPER}} ${CFLAGS}") endif(${BUILD_UPPER}) + set(CFLAGS "${OPTION_OPTIM} ${CMAKE_C_FLAGS} ${CFLAGS}") foreach(arg ${FLTK_CFLAGS}) - set(CFLAGS "${CFLAGS} ${arg}") + set(CFLAGS "${CFLAGS} ${arg}") endforeach(arg ${FLTK_CFLAGS}) set(CXXFLAGS ${CFLAGS}) @@ -73,9 +74,8 @@ endforeach(arg ${FLTK_LDLIBS}) set(LIBS ${LINK_LIBS}) -# FIXME: The only case `configure' would set the "SHAREDSUFFIX" -# variable is to "_s" if OS == "aix", hence we do NOT (yet) set it here. -# This is for fltk-config only, so it doesn't matter much anyway. -# ${CMAKE_SHARED_LIBRARY_SUFFIX} would be ".so" under Linux. -# * do not * set(SHAREDSUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) -set(SHAREDSUFFIX "") +if (${CMAKE_SYSTEM_NAME} STREQUAL "AIX") + set(SHAREDSUFFIX "_s") +else () + set(SHAREDSUFFIX "") +endif (${CMAKE_SYSTEM_NAME} STREQUAL "AIX")